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

Method OnKeyDown

engine/Poseidon/UI/Map/UIMapExt.cpp:1364–1398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1362}
1363
1364bool CStaticMapArcadeViewer::OnKeyDown(unsigned nChar, unsigned nRepCnt, unsigned nFlags)
1365{
1366 switch (nChar)
1367 {
1368 case SDLK_F1:
1369 {
1370 if (_parent->IDD() != IDD_INTEL_GETREADY)
1371 {
1372 break;
1373 }
1374 CToolBox* box = dynamic_cast<CToolBox*>(_parent->GetCtrl(IDC_GETREADY_EDITMODE));
1375 if (!box)
1376 {
1377 break;
1378 }
1379 box->SetCurSel(0);
1380 return true;
1381 }
1382 case SDLK_F2:
1383 {
1384 if (_parent->IDD() != IDD_INTEL_GETREADY)
1385 {
1386 break;
1387 }
1388 CToolBox* box = dynamic_cast<CToolBox*>(_parent->GetCtrl(IDC_GETREADY_EDITMODE));
1389 if (!box)
1390 {
1391 break;
1392 }
1393 box->SetCurSel(1);
1394 return true;
1395 }
1396 }
1397 return CStaticMap::OnKeyDown(nChar, nRepCnt, nFlags);
1398}
1399
1400bool CStaticMapArcade::OnKeyDown(unsigned nChar, unsigned nRepCnt, unsigned nFlags)
1401{

Callers

nothing calls this directly

Calls 15

GetCenterFunction · 0.85
logFunction · 0.85
IDDMethod · 0.80
FindPlayerMethod · 0.80
IsKeyDownMethod · 0.80
UnitDeleteMethod · 0.80
WaypointDeleteMethod · 0.80
SensorDeleteMethod · 0.80
Vector3Class · 0.50
GetCtrlMethod · 0.45
SetCurSelMethod · 0.45
DistanceMethod · 0.45

Tested by

no test coverage detected