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

Method onAction

Engine/source/gui/buttons/guiButtonBaseCtrl.cpp:432–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430//-----------------------------------------------------------------------------
431
432void GuiButtonBaseCtrl::onAction()
433{
434 if(!mActive)
435 return;
436
437 if(mButtonType == ButtonTypeCheck)
438 {
439 mStateOn = mStateOn ? false : true;
440 }
441 else if(mButtonType == ButtonTypeRadio)
442 {
443 mStateOn = true;
444 messageSiblings(mRadioGroup);
445 }
446 setUpdate();
447
448 // Update the console variable:
449 if ( mConsoleVariable[0] )
450 Con::setBoolVariable( mConsoleVariable, mStateOn );
451
452 onClick_callback();
453 Parent::onAction();
454}
455
456//-----------------------------------------------------------------------------
457

Callers 1

Calls 1

setBoolVariableFunction · 0.85

Tested by

no test coverage detected