Skip to content

Add a button to properly quit the campaign, a "Game menu" (on ESC) and remove the Disconnect dialogue

terencehill requested to merge terencehill/menu_quit_game into master
  • Add "Quit campaign" / "Quit current game" button to Singleplayer and Multiplayer / Create windows to properly quit campaign, and also disable the "Start Multiplayer!" button while playing the campaign.
    This way it's no longer possible to start a multiplayer game while the campaign settings are still visible in Multiplayer / Create window (these settings are temporary and won't be applied anyway)

  • On manual disconnection make sure g_campaign is reset and menu items reflect cvar values that may have been restored after quitting the campaign

  • Add "Quit campaign" / "Quit current game" button to the Quit dialogue, bind f11 to open the Quit dialogue and get rid of the Disconnect dialogue

EDIT: When not playing the "Quit campaign" / "Quit current game" button is disabled (and shows "Quit current game").

EDIT2:

  • The Quit button now shows "Quit singleplayer" or "Quit multiplayer" instead of "Quit current game" while playing singleplayer or multiplayer. When not playing at all it shows "Quit current game" (button disabled).

  • I also added a tooltip that shows up only while playing multiplayer "Quit multiplayer / Disconnect from the server" because most players are used to "disconnect".

  • I also added a Quit button to the server list dialogue (Multiplayer / Join dialogue) because I think it's handy in general and especially for new players that aren't used to the F10 / F11 key bind

EDIT3:

  • Added a small Menu game dialog that can be opened with F11, instead of duplicating the functionality of F10.
Multiplayer (during the campaign) Singleplayer (during the campaign)
multiplayer singleplayer
Quit (during a multiplayer game) Game menu
quit game_menu
Edited by terencehill

Merge request reports