• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ vgui::DHANDLE类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中vgui::DHANDLE的典型用法代码示例。如果您正苦于以下问题:C++ DHANDLE类的具体用法?C++ DHANDLE怎么用?C++ DHANDLE使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了DHANDLE类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SetShowProgressText

//-----------------------------------------------------------------------------
// Purpose: Returns prev settings
//-----------------------------------------------------------------------------
bool CGameUI::SetShowProgressText( bool show )
{
	if (!g_hLoadingDialog.Get())
		return false;

	return g_hLoadingDialog->SetShowProgressText( show );
}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:10,代码来源:gameui_interface.cpp


示例2: ShowMedalCollection

void ShowMedalCollection()
{
	using namespace vgui;

	vgui::Panel *pMedalPanel = GetClientMode()->GetViewport()->FindChildByName("MedalCollectionPanel", true);
	if (pMedalPanel)	
	{
		pMedalPanel->SetVisible(false);
		pMedalPanel->MarkForDeletion();
		pMedalPanel = NULL;
		return;
	}

	vgui::Frame* pFrame = NULL;
	// create the basic frame which holds our briefing panels
	//Msg("Assigning player list frame\n");
	if (g_hBriefingFrame.Get())	// todo: handle if they bring it up during debrief or campaign map too
		pMedalPanel = new vgui::Panel( g_hBriefingFrame.Get(), "MedalCollectionPanel" );
	else
	{
		pFrame = new vgui::Frame( GetClientMode()->GetViewport(), "MedalCollectionPanel" );
		pMedalPanel = pFrame;
	}
	HScheme scheme = vgui::scheme()->LoadSchemeFromFile("resource/SwarmSchemeNew.res", "SwarmSchemeNew");
	pMedalPanel->SetScheme(scheme);
	pMedalPanel->SetBounds(0, 0, GetClientMode()->GetViewport()->GetWide(), GetClientMode()->GetViewport()->GetTall());
	//pMedalPanel->SetPos(GetClientMode()->GetViewport()->GetWide() * 0.15f, GetClientMode()->GetViewport()->GetTall() * 0.15f);
	//pMedalPanel->SetSize( GetClientMode()->GetViewport()->GetWide() * 0.7f, GetClientMode()->GetViewport()->GetTall() * 0.7f );

	if (pFrame)
	{		
		pFrame->SetMoveable(false);
		pFrame->SetSizeable(false);
		pFrame->SetMenuButtonVisible(false);
		pFrame->SetMaximizeButtonVisible(false);
		pFrame->SetMinimizeToSysTrayButtonVisible(false);
		pFrame->SetCloseButtonVisible(true);
		pFrame->SetTitleBarVisible(false);
	}
	pMedalPanel->SetPaintBackgroundEnabled(false);
	pMedalPanel->SetBgColor(Color(0,0,0, 192));

	// the panel to show the info
	MedalCollectionPanel *collection = new MedalCollectionPanel( pMedalPanel, "Collection" );
	collection->SetVisible( true );
	collection->SetBounds(0, 0, pMedalPanel->GetWide(),pMedalPanel->GetTall());

	if (!pMedalPanel)
	{
		Msg("Error: pMedalPanel frame was closed immediately on opening\n");
	}
	else
	{
		pMedalPanel->RequestFocus();
		pMedalPanel->SetVisible(true);
		pMedalPanel->SetEnabled(true);
		pMedalPanel->SetKeyBoardInputEnabled(false);
		pMedalPanel->SetZPos(200);		
	}
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:60,代码来源:c_asw_concommands.cpp


示例3: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: gets the font from the scheme
//-----------------------------------------------------------------------------
void Tooltip::ApplySchemeSettings(IScheme *pScheme)
{
	if ( s_TooltipWindow.Get() )
	{
		s_TooltipWindow->SetFont(pScheme->GetFont("DefaultSmall", s_TooltipWindow->IsProportional()));
	}
}
开发者ID:,项目名称:,代码行数:10,代码来源:


示例4: ASW_GetSmallFont

vgui::HFont ASW_GetSmallFont(bool bGlow)
{
    vgui::IScheme *pScheme = vgui::scheme()->GetIScheme( vgui::scheme()->GetScheme( "SwarmSchemeNew" ) );
    if ( !pScheme )
        return vgui::INVALID_FONT;

    return pScheme->GetFont( "DefaultSmall", true );

    if (!g_hObjectivesHUD.Get())
    {
        g_hObjectivesHUD = GET_HUDELEMENT( CASWHudObjective );
    }

    if (!g_hObjectivesHUD.Get())
    {
        return vgui::INVALID_FONT;
    }

    if (g_hObjectivesHUD->m_iLastHeight != ScreenHeight())
        g_hObjectivesHUD->SetDefaultHUDFonts();

    if (bGlow)
        return g_hObjectivesHUD->m_hSmallGlowFont;

    return g_hObjectivesHUD->m_hSmallFont;
}
开发者ID:Romikus33,项目名称:MoreGreenTea,代码行数:26,代码来源:asw_hud_objective.cpp


示例5: SetText

//-----------------------------------------------------------------------------
// Purpose: Set the tooltip text
//-----------------------------------------------------------------------------
void Tooltip::SetText(const char *text)
{
	_isDirty = true;

	if (!text)
	{
		text = "";
	}

	if (m_Text.Count() > 0)
	{
		m_Text.RemoveAll();
	}

	for (unsigned int i = 0; i < strlen(text); i++)
	{
		m_Text.AddToTail(text[i]);
	}
	m_Text.AddToTail('\0');
	
	if (s_TooltipWindow.Get())
	{
		s_TooltipWindow->SetText(m_Text.Base());
	}
}
开发者ID:,项目名称:,代码行数:28,代码来源:


示例6: Detach

//-----------------------------------------------------------------------------
// main application
//-----------------------------------------------------------------------------
void CVsVGuiWindow::Detach()
{
	if ( m_hTimerCallbackId != 0 )
	{
		MTimerMessage::removeCallback( m_hTimerCallbackId );
		m_hTimerCallbackId = 0;
	}

	if ( m_hMainPanel.Get() )
	{
		m_hMainPanel->MarkForDeletion();
		m_hMainPanel = NULL;
	}

	if ( m_hVGuiContext != vgui::DEFAULT_VGUI_CONTEXT )
	{
		vgui::ivgui()->DestroyContext( m_hVGuiContext );
		m_hVGuiContext = vgui::DEFAULT_VGUI_CONTEXT;
	}

	// detach
	if ( m_hWnd )
	{
		// kill the timer if any
		g_pMaterialSystem->RemoveView( m_hWnd );
		RemoveWindowSubclass( m_hWnd, SubclassCallback, s_subclassId );
		m_hWnd = NULL;
	}

	if ( m_hKeyFocusWnd )
	{
		RemoveWindowSubclass( m_hKeyFocusWnd, KeyFocusSubclassCallback, s_subclassId );
		m_hKeyFocusWnd = NULL;
	}
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:38,代码来源:VsVguiWindow.cpp


示例7: OnDisconnectFromServer

//-----------------------------------------------------------------------------
// Purpose: Called when the game disconnects from a server
//-----------------------------------------------------------------------------
void CGameUI::OnDisconnectFromServer( uint8 eSteamLoginFailure )
{
	m_iGameIP = 0;
	m_iGameConnectionPort = 0;
	m_iGameQueryPort = 0;

	if ( g_hLoadingBackgroundDialog )
	{
		vgui::ivgui()->PostMessage( g_hLoadingBackgroundDialog, new KeyValues("DisconnectedFromGame"), NULL );
	}

	g_VModuleLoader.PostMessageToAllModules(new KeyValues("DisconnectedFromGame"));

	if ( eSteamLoginFailure == STEAMLOGINFAILURE_NOSTEAMLOGIN )
	{
		if ( g_hLoadingDialog )
		{
			g_hLoadingDialog->DisplayNoSteamConnectionError();
		}
	}
	else if ( eSteamLoginFailure == STEAMLOGINFAILURE_VACBANNED )
	{
		if ( g_hLoadingDialog )
		{
			g_hLoadingDialog->DisplayVACBannedError();
		}
	}
	else if ( eSteamLoginFailure == STEAMLOGINFAILURE_LOGGED_IN_ELSEWHERE )
	{
		if ( g_hLoadingDialog )
		{
			g_hLoadingDialog->DisplayLoggedInElsewhereError();
		}
	}
}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:38,代码来源:gameui_interface.cpp


示例8: CloseBriefingFrame

void BriefingImagePanel::CloseBriefingFrame()
{
	if (g_hBriefingFrame.Get())
	{
		if (GetClientModeASW())
			GetClientModeASW()->StopBriefingMusic();
		g_hBriefingFrame->SetDeleteSelfOnClose(true);
		g_hBriefingFrame->Close();

		FadeInPanel *pFadeIn = dynamic_cast<FadeInPanel*>(GetClientMode()->GetViewport()->FindChildByName("FadeIn", true));
		if (pFadeIn)
		{
			pFadeIn->AllowFastRemove();
		}

		// clear the currently visible part of the chat
		CHudChat *pChat = GET_HUDELEMENT( CHudChat );
		if (pChat && pChat->GetChatHistory())
			pChat->GetChatHistory()->ResetAllFades( false, false, 0 );
// 		if (m_pChatEcho)
// 		{
// 			m_pChatEcho->SetVisible(false);
// 		}
	}

	g_hBriefingFrame = NULL;
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:27,代码来源:briefingimagepanel.cpp


示例9: SetSecondaryProgressBar

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CGameUI::SetSecondaryProgressBar(float progress /* range [0..1] */)
{
	if (!g_hLoadingDialog.Get())
		return;

	g_hLoadingDialog->SetSecondaryProgress(progress);
}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:10,代码来源:gameui_interface.cpp


示例10: SetSecondaryProgressBarText

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CGameUI::SetSecondaryProgressBarText(const char *statusText)
{
	if (!g_hLoadingDialog.Get())
		return;

	g_hLoadingDialog->SetSecondaryProgressText(statusText);
}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:10,代码来源:gameui_interface.cpp


示例11: StopProgressBar

//-----------------------------------------------------------------------------
// Purpose: stops progress bar, displays error if necessary
//-----------------------------------------------------------------------------
void CGameUI::StopProgressBar(bool bError, const char *failureReason, const char *extendedReason)
{
	if (!g_hLoadingDialog.Get() && bError)
	{
		g_hLoadingDialog = new CLoadingDialog(staticPanel);
	}

	if (!g_hLoadingDialog.Get())
		return;

	if (bError)
	{
		// turn the dialog to error display mode
		g_hLoadingDialog->DisplayError(failureReason,extendedReason);
	}
	else
	{
		// close loading dialog
		g_hLoadingDialog->Close();
		g_hLoadingDialog = NULL;
	}

	// stop drawing loading screen
	staticPanel->SetBackgroundRenderState(CBasePanel::BACKGROUND_DESKTOPIMAGE);
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:28,代码来源:GameUI_Interface.cpp


示例12: ContinueProgressBar

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
int CGameUI::ContinueProgressBar(int progressPoint, float progressFraction)
{
	if (!g_hLoadingDialog.Get())
		return 0;

	g_hLoadingDialog->SetProgressPoint(progressPoint);
	return 1;
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:11,代码来源:GameUI_Interface.cpp


示例13: Shutdown

	void Shutdown()
	{
		DestroySDKLoadingPanel();
		if (g_hLogoPanel.Get())
		{
			delete g_hLogoPanel.Get();
		}
	}
开发者ID:jimbomcb,项目名称:hl2wars_asw_dev,代码行数:8,代码来源:clientmode_wars.cpp


示例14: SetProgressBarStatusText

//-----------------------------------------------------------------------------
// Purpose: sets loading info text
//-----------------------------------------------------------------------------
int CGameUI::SetProgressBarStatusText(const char *statusText)
{
	if (!g_hLoadingDialog.Get())
		return 0;

	g_hLoadingDialog->SetStatusText(statusText);
	return 1;
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:11,代码来源:GameUI_Interface.cpp


示例15: HideTooltip

//-----------------------------------------------------------------------------
// Purpose: Display the tooltip
//-----------------------------------------------------------------------------
void Tooltip::HideTooltip()
{
	if ( s_TooltipWindow.Get() )
	{
		s_TooltipWindow->SetVisible(false);
	}
	_makeVisible = false;
}
开发者ID:chrizonix,项目名称:RCBot2,代码行数:11,代码来源:Tooltip.cpp


示例16: ContinueProgressBar

//-----------------------------------------------------------------------------
// Purpose: returns true if the screen should be updated
//-----------------------------------------------------------------------------
bool CGameUI::ContinueProgressBar( float progressFraction )
{
	if (!g_hLoadingDialog.Get())
		return false;

	g_hLoadingDialog->Activate();
	return g_hLoadingDialog->SetProgressPoint(progressFraction);
}
开发者ID:DonnaLisa,项目名称:swarm-deferred,代码行数:11,代码来源:gameui_interface.cpp


示例17: SetText

//-----------------------------------------------------------------------------
// Purpose: Set the tooltip text
//-----------------------------------------------------------------------------
void TextTooltip::SetText(const char *text)
{
	BaseTooltip::SetText( text );
	
	if (s_TooltipWindow.Get())
	{
		s_TooltipWindow->SetText(m_Text.Base());
	}
}
开发者ID:Baer42,项目名称:source-sdk-2013,代码行数:12,代码来源:Tooltip.cpp


示例18: HideTooltip

//-----------------------------------------------------------------------------
// Purpose: Display the tooltip
//-----------------------------------------------------------------------------
void TextTooltip::HideTooltip()
{
	if ( s_TooltipWindow.Get() )
	{
		s_TooltipWindow->SetVisible(false);
	}

	BaseTooltip::HideTooltip();
}
开发者ID:Baer42,项目名称:source-sdk-2013,代码行数:12,代码来源:Tooltip.cpp


示例19: asw_pick_stim_music_f

void asw_pick_stim_music_f()
{
	if (g_hSelectStimMusicDialog.Get() == NULL)
	{
		g_hSelectStimMusicDialog = new StimMusicSelectDialog(NULL, "#asw_pick_stim_music", vgui::FOD_OPEN, NULL);
		g_hSelectStimMusicDialog->AddFilter("*.mp3,*.wav", "#asw_stim_music_types", true);
	}
	g_hSelectStimMusicDialog->DoModal(false);
	g_hSelectStimMusicDialog->Activate();
}
开发者ID:BenLubar,项目名称:SwarmDirector2,代码行数:10,代码来源:stimmusicselectdialog.cpp


示例20:

//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
Tooltip::~Tooltip()
{
	if (--s_iTooltipWindowCount < 1)
	{
		if ( s_TooltipWindow.Get() )
		{
			s_TooltipWindow->MarkForDeletion();
		}
		s_TooltipWindow = NULL;
	}
}
开发者ID:,项目名称:,代码行数:14,代码来源:



注:本文中的vgui::DHANDLE类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ vgui::TextEntry类代码示例发布时间:2022-05-31
下一篇:
C++ vfs::Path类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap