Added multiplayer tab for launcher + backend improvements

Adds a multiplayer tab to allow hosting and joining games from within the GZDoom launcher rather than needed to use the command line. This has its own set of defaults independent from the main play page which necessitated rewriting how this information is passed and stored in the backend. A startup info struct is now passed back which has its defaults set from the cvars and then propagates any changes to it back to the defaults after selection is complete, making it much simpler to interface with the engine defaults.
This commit is contained in:
Boondorl 2025-07-02 19:56:17 -04:00 committed by Ricardo Luís Vaz Silva
commit 9701bfaa5c
18 changed files with 1006 additions and 156 deletions

View file

@ -15,7 +15,14 @@ LauncherButtonbar::LauncherButtonbar(LauncherWindow* parent) : Widget(parent)
void LauncherButtonbar::UpdateLanguage()
{
PlayButton->SetText(GStrings.GetString("PICKER_PLAY"));
auto launcher = GetLauncher();
if (!launcher->IsInMultiplayer())
PlayButton->SetText(GStrings.GetString("PICKER_PLAY"));
else if (launcher->IsHosting())
PlayButton->SetText(GStrings.GetString("PICKER_PLAYHOST"));
else
PlayButton->SetText(GStrings.GetString("PICKER_PLAYJOIN"));
ExitButton->SetText(GStrings.GetString("PICKER_EXIT"));
}