unittests: fix library loading

This commit is contained in:
nillerusr
2023-04-07 13:47:43 +03:00
parent dcdcf6b733
commit 4f063c4053
9 changed files with 156 additions and 127 deletions
+18 -2
View File
@@ -915,7 +915,7 @@ CBasePanel::CBasePanel() : Panel(NULL, "BaseGameUIPanel")
}
}
if( IsAndroid() )
// if( IsAndroid() )
{
AddUrlButton( this, "vgui/\x64\x69\x73\x63\x6f\x72\x64\x5f\x6c\x6f\x67\x6f", "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x64\x69\x73\x63\x6f\x72\x64\x2e\x67\x67\x2f\x68\x5a\x52\x42\x37\x57\x4d\x67\x47\x77" );
AddUrlButton( this, "vgui/\x74\x77\x69\x74\x74\x65\x72\x5f\x6c\x6f\x67\x6f", "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x74\x77\x69\x74\x74\x65\x72\x2e\x63\x6f\x6d\x2f\x6e\x69\x6c\x6c\x65\x72\x75\x73\x72" );
@@ -1607,6 +1607,21 @@ CGameMenu *CBasePanel::RecursiveLoadGameMenu(KeyValues *datafile)
else
menu->AddMenuItem("Console", "CONSOLE", "OpenConsole", this);
bool bFoundServerBrowser = false;
for (KeyValues *dat = datafile->GetFirstSubKey(); dat != NULL; dat = dat->GetNextKey())
{
const char *label = dat->GetString("label", "<unknown>");
const char *cmd = dat->GetString("command", NULL);
const char *name = dat->GetString("name", label);
if( cmd && Q_strcmp(cmd, "OpenServerBrowser") == 0 )
bFoundServerBrowser = true;
}
if( !bFoundServerBrowser && !ModInfo().IsSinglePlayerOnly() )
menu->AddMenuItem("AntiM*dG*yButton", "#GameUI_GameMenu_FindServers", "OpenServerBrowser", this);
// loop through all the data adding items to the menu
for (KeyValues *dat = datafile->GetFirstSubKey(); dat != NULL; dat = dat->GetNextKey())
{
@@ -1614,7 +1629,8 @@ CGameMenu *CBasePanel::RecursiveLoadGameMenu(KeyValues *datafile)
const char *cmd = dat->GetString("command", NULL);
const char *name = dat->GetString("name", label);
if ( cmd && !Q_stricmp( cmd, "OpenFriendsDialog" ) && bSteamCommunityFriendsVersion )
if ( cmd && (!Q_stricmp( cmd, "OpenFriendsDialog" )
|| !Q_stricmp( cmd, "engine bug" )) )
continue;
menu->AddMenuItem(name, label, cmd, this, dat);