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

Method onAction

Engine/source/gui/buttons/guiButtonBaseCtrl.cpp:433–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

setBoolVariableFunction · 0.85

Tested by

no test coverage detected