MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / onAction

Method onAction

Engine/source/gui/editor/guiMenuBar.cpp:1431–1446  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1429
1430//------------------------------------------------------------------------------
1431void GuiMenuBar::onAction()
1432{
1433 if(!mouseDownMenu)
1434 return;
1435
1436 mouseDownMenu->popupMenu->hidePopup();
1437
1438 // first, call the script callback for menu selection:
1439 onMenuSelect_callback(mouseDownMenu->popupMenu->getId(), mouseDownMenu->text);
1440
1441 mouseDownMenu->popupMenu->mMenuBarCtrl = this;
1442
1443 GuiCanvas *root = getRoot();
1444 Point2I pos = Point2I(mouseDownMenu->bounds.point.x, mouseDownMenu->bounds.point.y + mouseDownMenu->bounds.extent.y);
1445 mouseDownMenu->popupMenu->showPopup(root, pos.x, pos.y);
1446}
1447
1448// Process a tick
1449void GuiMenuBar::processTick()

Callers

nothing calls this directly

Calls 4

hidePopupMethod · 0.80
showPopupMethod · 0.80
getIdMethod · 0.65
Point2IClass · 0.50

Tested by

no test coverage detected