diff --git a/sp/src/game/client/mapbase/c_vgui_text_display.cpp b/sp/src/game/client/mapbase/c_vgui_text_display.cpp index 5d424682..c3847ac0 100644 --- a/sp/src/game/client/mapbase/c_vgui_text_display.cpp +++ b/sp/src/game/client/mapbase/c_vgui_text_display.cpp @@ -111,7 +111,7 @@ private: DECLARE_VGUI_SCREEN_FACTORY( C_TextDisplayPanel, "text_display_panel" ); -CUtlVector g_WorldTextDisplays; +CUtlVector g_TextDisplays; //----------------------------------------------------------------------------- // Constructor: @@ -120,7 +120,7 @@ C_TextDisplayPanel::C_TextDisplayPanel( vgui::Panel *parent, const char *panelNa : BaseClass( parent, "C_TextDisplayPanel"/*, vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL ), "resource/WorldTextPanel.res", "WorldTextPanel" )*/ ) { // Add ourselves to the global list of movie displays - g_WorldTextDisplays.AddToTail( this ); + g_TextDisplays.AddToTail( this ); } //----------------------------------------------------------------------------- @@ -129,7 +129,7 @@ C_TextDisplayPanel::C_TextDisplayPanel( vgui::Panel *parent, const char *panelNa C_TextDisplayPanel::~C_TextDisplayPanel( void ) { // Remove ourselves from the global list of movie displays - g_WorldTextDisplays.FindAndRemove( this ); + g_TextDisplays.FindAndRemove( this ); } //----------------------------------------------------------------------------- @@ -186,7 +186,7 @@ void C_TextDisplayPanel::UpdateText() m_pDisplayTextLabel->SetWrap( bWrap ); m_pDisplayTextLabel->SetCenterWrap( bCenterWrap ); - Msg( "Resolution is %i\n", m_hScreenEntity->GetResolution() ); + //Msg( "Resolution is %i\n", m_hScreenEntity->GetResolution() ); const char *pszFontName = m_hScreenEntity->GetFontName(); if (pszFontName && pszFontName[0] != '\0') diff --git a/sp/src/game/server/mapbase/vgui_text_display.cpp b/sp/src/game/server/mapbase/vgui_text_display.cpp index fc490e67..84e0ac63 100644 --- a/sp/src/game/server/mapbase/vgui_text_display.cpp +++ b/sp/src/game/server/mapbase/vgui_text_display.cpp @@ -43,6 +43,7 @@ public: void InputDisable( inputdata_t &inputdata ); void InputEnable( inputdata_t &inputdata ); + void InputToggle( inputdata_t &inputdata ); void InputSetMessage( inputdata_t &inputdata ); void InputSetTextAlignment( inputdata_t &inputdata ); @@ -95,6 +96,7 @@ BEGIN_DATADESC( CVGuiTextDisplay ) DEFINE_INPUTFUNC( FIELD_VOID, "Disable", InputDisable ), DEFINE_INPUTFUNC( FIELD_VOID, "Enable", InputEnable ), + DEFINE_INPUTFUNC( FIELD_VOID, "Toggle", InputToggle ), DEFINE_INPUTFUNC( FIELD_STRING, "SetMessage", InputSetMessage ), DEFINE_INPUTFUNC( FIELD_INTEGER, "SetTextAlignment", InputSetTextAlignment ), @@ -116,7 +118,7 @@ CVGuiTextDisplay::CVGuiTextDisplay() { m_flTextSize = 100.0f; m_iResolution = 200; - m_iContentAlignment = 6; // a_southwest + m_iContentAlignment = 7; // a_south } CVGuiTextDisplay::~CVGuiTextDisplay() @@ -295,6 +297,14 @@ void CVGuiTextDisplay::InputEnable( inputdata_t &inputdata ) Enable(); } +//----------------------------------------------------------------------------- +// +//----------------------------------------------------------------------------- +void CVGuiTextDisplay::InputToggle( inputdata_t &inputdata ) +{ + m_bEnabled ? Disable() : Enable(); +} + //----------------------------------------------------------------------------- // //-----------------------------------------------------------------------------