MCPcopy Create free account
hub / github.com/JACoders/OpenJK / UI_LoadMissionSelectMenu

Function UI_LoadMissionSelectMenu

code/ui/ui_main.cpp:5649–5673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5647}
5648
5649static void UI_LoadMissionSelectMenu( const char *cvarName )
5650{
5651 int holdLevel = (int)trap_Cvar_VariableValue(cvarName);
5652
5653 // Figure out which tier menu to load
5654 if ((holdLevel > 0) && (holdLevel < 5))
5655 {
5656 UI_LoadMenus("ui/tier1.txt",qfalse);
5657
5658 Menus_CloseByName("ingameMissionSelect1");
5659 }
5660 else if ((holdLevel > 6) && (holdLevel < 10))
5661 {
5662 UI_LoadMenus("ui/tier2.txt",qfalse);
5663
5664 Menus_CloseByName("ingameMissionSelect2");
5665 }
5666 else if ((holdLevel > 11) && (holdLevel < 15))
5667 {
5668 UI_LoadMenus("ui/tier3.txt",qfalse);
5669
5670 Menus_CloseByName("ingameMissionSelect3");
5671 }
5672
5673}
5674
5675// Update the player weapons with the chosen weapon
5676static void UI_AddWeaponSelection ( const int weaponIndex, const int ammoIndex, const int ammoAmount, const char *iconItemName,const char *litIconItemName, const char *hexBackground, const char *soundfile )

Callers 1

UI_RunMenuScriptFunction · 0.85

Calls 3

trap_Cvar_VariableValueFunction · 0.70
UI_LoadMenusFunction · 0.70
Menus_CloseByNameFunction · 0.70

Tested by

no test coverage detected