MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / onKeyDown

Method onKeyDown

Engine/source/gui/editor/guiMenuBar.cpp:1515–1539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1513}
1514
1515bool GuiMenuTextListCtrl::onKeyDown(const GuiEvent &event)
1516{
1517 //if the control is a dead end, don't process the input:
1518 if ( !mVisible || !mActive || !mAwake )
1519 return false;
1520
1521 //see if the key down is a <return> or not
1522 if ( event.modifier == 0 )
1523 {
1524 if ( event.keyCode == KEY_RETURN )
1525 {
1526 mMenuBarCtrl->closeMenu();
1527 return true;
1528 }
1529 else if ( event.keyCode == KEY_ESCAPE )
1530 {
1531 mSelectedCell.set( -1, -1 );
1532 mMenuBarCtrl->closeMenu();
1533 return true;
1534 }
1535 }
1536
1537 //otherwise, pass the event to it's parent
1538 return Parent::onKeyDown(event);
1539}
1540
1541void GuiMenuTextListCtrl::onMouseDown(const GuiEvent &event)
1542{

Callers

nothing calls this directly

Calls 2

closeMenuMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected