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

Method OnButtonClicked

engine/Poseidon/UI/DisplayUISetupMP.cpp:995–1019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993 base::OnSimulate(vehicle);
994}
995
996DisplayServerGetReady::DisplayServerGetReady(ControlsContainer* parent) : base(parent, "RscDisplayServerGetReady") {}
997
998void DisplayServerGetReady::OnButtonClicked(int idc)
999{
1000 switch (idc)
1001 {
1002 case IDC_OK:
1003 {
1004 CListBox* lbox = dynamic_cast<CListBox*>(GetCtrl(IDC_SERVER_READY_PLAYERS));
1005 PoseidonAssert(lbox);
1006 for (int i = 0; i < lbox->GetSize(); i++)
1007 {
1008 if (lbox->GetValue(i) == 0)
1009 {
1010 CreateMsgBox(MB_BUTTON_OK | MB_BUTTON_CANCEL, LocalizeString(IDS_MSG_LAUNCH_GAME),
1011 IDD_MSG_LAUNCHGAME);
1012 return;
1013 }
1014 }
1015 Exit(IDC_OK);
1016 }
1017 break;
1018 default:
1019 base::OnButtonClicked(idc);
1020 break;
1021 }
1022}

Callers

nothing calls this directly

Calls 13

GetCtrlFunction · 0.85
LocalizeStringFunction · 0.85
ToggleVoiceMuteFunction · 0.85
ToggleChatIgnoreFunction · 0.85
GetSizeMethod · 0.45
GetValueMethod · 0.45
IsServerMethod · 0.45
GetCurSelMethod · 0.45
GetPlayerMethod · 0.45
KickOffMethod · 0.45
IsGameMasterMethod · 0.45
SendKickMethod · 0.45

Tested by

no test coverage detected