diff options
| author | Michael Sartain <[email protected]> | 2014-10-02 08:25:55 -0700 |
|---|---|---|
| committer | Michael Sartain <[email protected]> | 2014-10-02 08:25:55 -0700 |
| commit | 55ed12f8d1eb6887d348be03aee5573d44177ffb (patch) | |
| tree | 3686f7ca78c780cd9a3d367b79a9d9250c1be7c0 /mp/src/game/client/game_controls/vguitextwindow.cpp | |
| parent | * Added support for Visual C++ 2013 Express to VPC (diff) | |
| download | source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.tar.xz source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.zip | |
Updated the SDK with the latest code from the TF and HL2 branches.
Diffstat (limited to 'mp/src/game/client/game_controls/vguitextwindow.cpp')
| -rw-r--r-- | mp/src/game/client/game_controls/vguitextwindow.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/mp/src/game/client/game_controls/vguitextwindow.cpp b/mp/src/game/client/game_controls/vguitextwindow.cpp index 5cdc2532..3c641859 100644 --- a/mp/src/game/client/game_controls/vguitextwindow.cpp +++ b/mp/src/game/client/game_controls/vguitextwindow.cpp @@ -102,11 +102,7 @@ CTextWindow::CTextWindow(IViewPort *pViewPort) : Frame(NULL, PANEL_INFO ) SetTitleBarVisible( false ); m_pTextMessage = new TextEntry( this, "TextMessage" ); -#if defined( ENABLE_CHROMEHTMLWINDOW ) m_pHTMLMessage = new CMOTDHTML( this,"HTMLMessage" ); -#else - m_pHTMLMessage = NULL; -#endif m_pTitleLabel = new Label( this, "MessageTitle", "Message Title" ); m_pOK = new Button(this, "ok", "#PropertyDialog_OK"); @@ -165,7 +161,6 @@ void CTextWindow::ShowText( const char *text ) void CTextWindow::ShowURL( const char *URL, bool bAllowUserToDisable ) { -#if defined( ENABLE_CHROMEHTMLWINDOW ) #ifdef _DEBUG Msg( "CTextWindow::ShowURL( %s )\n", URL ); #endif @@ -196,8 +191,6 @@ void CTextWindow::ShowURL( const char *URL, bool bAllowUserToDisable ) m_pHTMLMessage->SetVisible( true ); m_pHTMLMessage->OpenURL( URL, NULL ); m_bShownURL = true; - -#endif } void CTextWindow::ShowIndex( const char *entry ) @@ -286,9 +279,8 @@ void CTextWindow::Update( void ) m_pTitleLabel->SetText( m_szTitle ); -#if defined( ENABLE_CHROMEHTMLWINDOW ) - m_pHTMLMessage->SetVisible( false ); -#endif + if ( m_pHTMLMessage ) + m_pHTMLMessage->SetVisible( false ); m_pTextMessage->SetVisible( false ); if ( m_nContentType == TYPE_INDEX ) @@ -427,13 +419,11 @@ void CTextWindow::ShowPanel( bool bShow ) SetVisible( false ); SetMouseInputEnabled( false ); -#if defined( ENABLE_CHROMEHTMLWINDOW ) - if ( m_bUnloadOnDismissal && m_bShownURL ) + if ( m_bUnloadOnDismissal && m_bShownURL && m_pHTMLMessage ) { m_pHTMLMessage->OpenURL( "about:blank", NULL ); m_bShownURL = false; } -#endif } } |