MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / UpdateMissions

Method UpdateMissions

engine/Poseidon/UI/DisplayUIMultiplayer.cpp:2376–2511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2374void DisplayServer::OnLBDblClick(int idc, int curSel)
2375{
2376 if (idc == IDC_SERVER_MISSION && curSel >= 0)
2377 {
2378 OnButtonClicked(IDC_OK);
2379 }
2380 else
2381 {
2382 Display::OnLBDblClick(idc, curSel);
2383 }
2384}
2385
2386void DisplayServer::OnChildDestroyed(int idd, int exit)
2387{
2388 switch (idd)
2389 {
2390 case IDD_ARCADE_MAP:
2391 Display::OnChildDestroyed(idd, exit);
2392 GetNetworkManager().SetGameState(NGSCreate);
2393
2394 UpdateMissions(Glob.header.filename);
2395 if (exit == IDC_OK)
2396 {
2397 OnButtonClicked(IDC_OK);
2398 }
2399 break;
2400 // case IDD_SERVER_SETUP:
2401 case IDD_SERVER_SIDE:
2402 Display::OnChildDestroyed(idd, exit);
2403 GetNetworkManager().SetGameState(NGSCreate);
2404 break;
2405 case IDD_WIZARD_TEMPLATE:
2406 Display::OnChildDestroyed(idd, exit);
2407 GetNetworkManager().SetGameState(NGSCreate);
2408 UpdateMissions(Glob.header.filename);
2409 if (exit == IDC_OK)
2410 {
2411 // load template
2412 CurrentTemplate.Clear();
2413 if (GWorld->UI())
2414 {
2415 GWorld->UI()->Init();
2416 }
2417 if (!ParseMission(true))
2418 {
2419 break;
2420 }
2421
2422 USER_CONFIG.easyMode = _cadetMode;
2423 GetNetworkManager().InitMission(_cadetMode);
2424 GetNetworkManager().SetGameState(NGSPrepareSide);
2425 CreateChild(new DisplayMultiplayerSetup(this));
2426 }
2427 break;
2428 default:
2429 Display::OnChildDestroyed(idd, exit);
2430 break;
2431 }
2432}
2433

Callers

nothing calls this directly

Calls 15

GetCtrlFunction · 0.85
LocalizeStringFunction · 0.85
ColorClass · 0.85
sprintfFunction · 0.85
_findfirstFunction · 0.85
_findnextFunction · 0.85
_findcloseFunction · 0.85
GetUserMissionsBaseFunction · 0.85
ClearStringsMethod · 0.80
AddStringMethod · 0.80
SortItemsByValueMethod · 0.80
SubstringMethod · 0.80

Tested by

no test coverage detected