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

Method OnButtonClicked

engine/Poseidon/UI/DisplayUIMenus.cpp:108–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 return Display::OnCreateCtrl(type, idc, cls);
107}
108
109void DisplayLogin::OnButtonClicked(int idc)
110{
111 switch (idc)
112 {
113 case IDC_LOGIN_NEW:
114 case IDC_LOGIN_EDIT:
115 Exit(idc);
116 break;
117 case IDC_OK:
118 case IDC_CANCEL:
119 {
120 _exit = idc;
121 bool canDestroy = CanDestroy();
122 _exit = -1;
123 if (!canDestroy)
124 {
125 break;
126 }
127 _exitWhenClose = idc;
128 ControlObjectContainerAnim* ctrl = dynamic_cast<ControlObjectContainerAnim*>(GetCtrl(IDC_LOGIN_NOTEBOOK));
129 if (ctrl)
130 {
131 ctrl->Close();
132 }
133 }
134 break;
135 case IDC_LOGIN_DELETE:
136 CreateMsgBox(MB_BUTTON_OK | MB_BUTTON_CANCEL, LocalizeString(IDS_SURE), IDD_MSG_DELETEPLAYER);
137 break;
138 default:
139 Display::OnButtonClicked(idc);
140 break;
141 }
142}
143
144void DisplayLogin::OnCtrlClosed(int idc)

Callers

nothing calls this directly

Calls 13

GetCtrlFunction · 0.85
LocalizeStringFunction · 0.85
ShowCtrlMethod · 0.80
CheckExecuteMethod · 0.80
GetLastErrorTextMethod · 0.80
SetCaretPosMethod · 0.80
GetLastErrorPosMethod · 0.80
CloseMethod · 0.45
GetTextMethod · 0.45
GetGameStateMethod · 0.45
ExecuteMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected