Client display
| 85 | return -1; // slot doesn't exist |
| 86 | } |
| 87 | |
| 88 | // Client display |
| 89 | void DisplayClient::OnButtonClicked(int idc) |
| 90 | { |
| 91 | switch (idc) |
| 92 | { |
| 93 | case IDC_OK: |
| 94 | { |
| 95 | // init game info |
| 96 | SetBaseDirectory(""); |
| 97 | CurrentCampaign = ""; |
| 98 | CurrentBattle = ""; |
| 99 | CurrentMission = ""; |
| 100 | USER_CONFIG.easyMode = false; |
| 101 | |
| 102 | CurrentTemplate.Clear(); |
| 103 | if (GWorld->UI()) |
| 104 | { |
| 105 | GWorld->UI()->Init(); |
| 106 | } |
| 107 | |
| 108 | // In auto-assign mode, default exit code is 2 (server offline before play). |
| 109 | // It gets overridden to 0 when a mission completes. |
| 110 | if (!AppConfig::Instance().GetMPAssign().empty()) |
| 111 | GApp->m_exitCode = 2; |
| 112 | |
| 113 | CreateChild(new DisplayMultiplayerSetup(this)); |
| 114 | } |
| 115 | break; |
| 116 | case IDC_AUTOCANCEL: |
| 117 | Exit(idc); |
| 118 | break; |
| 119 | default: |
| 120 | Display::OnButtonClicked(idc); |
| 121 | break; |
| 122 | } |
| 123 | } |
| 124 |
nothing calls this directly
no test coverage detected