File tree Expand file tree Collapse file tree
src/game/client/swarm/vgui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,6 +152,10 @@ void CRD_VGUI_Settings::OnCommand( const char *command )
152152 {
153153 NavigateToTab ( m_pBtnAbout, m_pPnlAbout, " about" );
154154 }
155+ else if ( !V_stricmp ( " Back" , command ) )
156+ {
157+ OnKeyCodePressed ( ButtonCodeToJoystickButtonCode ( KEY_XBUTTON_B, CBaseModPanel::GetSingleton ().GetLastActiveUserId () ) );
158+ }
155159 else
156160 {
157161 BaseClass::OnCommand ( command );
@@ -215,6 +219,18 @@ void CRD_VGUI_Settings_Panel_Base::NavigateTo()
215219 BaseClass::NavigateTo ();
216220}
217221
222+ void CRD_VGUI_Settings_Panel_Base::OnCommand ( const char *command )
223+ {
224+ if ( !V_stricmp ( " Back" , command ) )
225+ {
226+ OnKeyCodePressed ( ButtonCodeToJoystickButtonCode ( KEY_XBUTTON_B, CBaseModPanel::GetSingleton ().GetLastActiveUserId () ) );
227+ }
228+ else
229+ {
230+ BaseClass::OnCommand ( command );
231+ }
232+ }
233+
218234class CRD_VGUI_Option_Color : public vgui ::EditablePanel
219235{
220236 DECLARE_CLASS_SIMPLE ( CRD_VGUI_Option_Color, vgui::EditablePanel );
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ class CRD_VGUI_Settings_Panel_Base : public vgui::EditablePanel
6666
6767 void ApplySchemeSettings ( vgui::IScheme *pScheme ) override ;
6868 void NavigateTo () override ;
69+ void OnCommand ( const char *command ) override ;
6970
7071 virtual void Activate () = 0;
7172 virtual BaseModUI::BaseModHybridButton *GetButton ( BaseModUI::CRD_VGUI_Settings *pSettings ) = 0;
You can’t perform that action at this time.
0 commit comments