Skip to content

Commit

Permalink
add rd_legacy_ui 2017
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Oct 15, 2023
1 parent e8e8cb5 commit 0c6a85b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
14 changes: 12 additions & 2 deletions reactivedrop/resource/background_movie.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,24 @@
"disabled" "0" // implied
"weight" "1" // implied
}

"ReactiveDropDefault"
{
"image" "materials/console/RdSelectionScreen_widescreen.vtf"
"video" "media/bg_01.bik"
"audio" "Misc.MainUI"
"mainmenu" "1"
// Can be 2017, 2010, 2004, or blank (default).
"legacy" "2017"
}

"AlienSwarmDefault"
{
"image" "materials/console/SwarmSelectionScreen_widescreen.vtf"
"video" "media/bg_02.bik"
"audio" "Misc.MainUI"
"mainmenu" "1"
// Can be 2010, 2004, or blank (default).
// Can be 2017, 2010, 2004, or blank (default).
"legacy" "2010"
}

Expand All @@ -27,7 +37,7 @@
"video" "media/bg_as2k4.bik"
"audio" "Misc.MainUI"
"mainmenu" "1"
// Can be 2010, 2004, or blank (default).
// Can be 2017, 2010, 2004, or blank (default).
"legacy" "2004"
}

Expand Down
8 changes: 6 additions & 2 deletions src/game/client/swarm/gameui/swarm/vmainmenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ static void OnLegacyUIChanged( IConVar *var, const char *pOldValue, float flOldV
// reset UI scripts
engine->ClientCmd_Unrestricted( "ui_reloadscheme; hud_reloadscheme\n" );
}
ConVar rd_legacy_ui( "rd_legacy_ui", "", FCVAR_ARCHIVE, "Set to 2004 or 2010 to use simulated versions of previous user interfaces.", OnLegacyUIChanged );
#if RD_IS_RELEASE
ConVar rd_legacy_ui( "rd_legacy_ui", "2017", FCVAR_DEVELOPMENTONLY, "Set to 2004, 2010, or 2017 to use simulated versions of previous user interfaces.", OnLegacyUIChanged );
#else
ConVar rd_legacy_ui( "rd_legacy_ui", "", FCVAR_ARCHIVE, "Set to 2004, 2010, or 2017 to use simulated versions of previous user interfaces.", OnLegacyUIChanged );
#endif

void Demo_DisableButton( Button *pButton );
void OpenGammaDialog( VPANEL parent );
Expand Down Expand Up @@ -369,7 +373,7 @@ void MainMenu::LoadLayout()
const char *pSettings = "Resource/UI/BaseModUI/MainMenu.res";
m_bIsLegacy = false;

if ( !V_strcmp( rd_legacy_ui.GetString(), "2004" ) || !V_strcmp( rd_legacy_ui.GetString(), "2010" ) )
if ( !V_strcmp( rd_legacy_ui.GetString(), "2004" ) || !V_strcmp( rd_legacy_ui.GetString(), "2010" ) || !V_strcmp( rd_legacy_ui.GetString(), "2017" ) )
{
pSettings = "Resource/UI/BaseModUI/MainMenuLegacy.res";
m_bIsLegacy = true;
Expand Down
12 changes: 11 additions & 1 deletion src/game/client/swarm/rd_collections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ ConVar rd_swarmopedia_grid( "rd_swarmopedia_grid", "0", FCVAR_ARCHIVE, "Draw a g
ConVar rd_swarmopedia_last_tab( "rd_swarmopedia_last_tab", "0", FCVAR_ARCHIVE, "Remembers last accessed tab index of the Swarmopedia screen." );
ConVar rd_collections_last_tab( "rd_collections_last_tab", "0", FCVAR_ARCHIVE, "Remembers last accessed tab index of the collections screen." );
extern ConVar rd_reduce_motion;
extern ConVar rd_legacy_ui;
extern ConVar asw_weapon_pitch;
extern ConVar_ServerBounded *m_pitch;

Expand All @@ -34,8 +35,17 @@ void LaunchCollectionsFrame()
pFrame = assert_cast< TabbedGridDetails * >( BaseModUI::CBaseModPanel::GetSingleton().OpenWindow( BaseModUI::WT_COLLECTIONS, NULL ) );
pFrame->SetTitle( "#rd_collection_title", true );
pFrame->AddTab( new CRD_Collection_Tab_Inventory( pFrame, "#rd_collection_inventory_medals", "medal" ) );
if ( rd_legacy_ui.GetString()[0] != '\0' )
{
pFrame->AddTab( new CRD_Collection_Tab_Equipment( pFrame, "#rd_collection_weapons", NULL, ASW_INVENTORY_SLOT_PRIMARY ) );
pFrame->AddTab( new CRD_Collection_Tab_Equipment( pFrame, "#rd_collection_equipment", NULL, ASW_INVENTORY_SLOT_EXTRA ) );
pFrame->AddTab( new CRD_Collection_Tab_Swarmopedia( pFrame, "#rd_collection_swarmopedia" ) );
}
else
{
pFrame->UseMainMenuLayout( CRD_VGUI_Main_Menu_Top_Bar::BTN_INVENTORY );
}
pFrame->RememberTabIndex( &rd_collections_last_tab );
pFrame->UseMainMenuLayout( CRD_VGUI_Main_Menu_Top_Bar::BTN_INVENTORY );
pFrame->ShowFullScreen();
}

Expand Down
6 changes: 6 additions & 0 deletions src/game/client/swarm/vgui/nb_leaderboard_panel_points.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ void CNB_Leaderboard_Panel_Points::OnCommand( const char *command )
OnKeyCodePressed( ButtonCodeToJoystickButtonCode( KEY_XBUTTON_B, CBaseModPanel::GetSingleton().GetLastActiveUserId() ) );
return;
}
if ( !V_stricmp( command, "ServerList" ) )
{
OnKeyCodePressed( ButtonCodeToJoystickButtonCode( KEY_XBUTTON_B, CBaseModPanel::GetSingleton().GetLastActiveUserId() ) );
CBaseModPanel::GetSingleton().OpenWindow( WT_FOUNDPUBLICGAMES, this, true );
return;
}
if ( !V_stricmp( command, "StatsWebsite" ) )
{
if ( SteamApps() )
Expand Down

0 comments on commit 0c6a85b

Please sign in to comment.