T3D 1.1 Final - Feature Request: Toggle Button Has No GetState - NOT A BUG
by Steve Acaster · in Torque 3D Professional · 07/06/2011 (1:56 pm) · 3 replies
T3D 1.1
win7 32 bit
Target
GUI toggle button
Issue:
ToggleButton has a *.setStateOn(bool) function (for pressed/unpressed) but rather oddly has no *.getState(float) function in script to identify which state is currently set.
Suggest:
Create a *.getState(float) function to return the toggleButton's state.
[edit]
And I've just been informed through the mystical powers of irc that *.getStateOn() function does actually exist in the engine, it's just not exposed to script.
win7 32 bit
Target
GUI toggle button
Issue:
ToggleButton has a *.setStateOn(bool) function (for pressed/unpressed) but rather oddly has no *.getState(float) function in script to identify which state is currently set.
Suggest:
Create a *.getState(float) function to return the toggleButton's state.
[edit]
And I've just been informed through the mystical powers of irc that *.getStateOn() function does actually exist in the engine, it's just not exposed to script.
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#3
I'll leave it up to GG to decide whether they want to include this - or just give the *.getValue() function a little more explanation in comments regarding it's use with toggleButton.
07/06/2011 (3:55 pm)
Thanks to Tron there is also this engineMethod now:DefineEngineMethod( GuiButtonBaseCtrl, getStateOn, bool, (),,
"For toggle or radio buttons, get whether the button is currently activated or not.\n"
"@return true if the button is in an On or active state, else false for an Off or inactive state.\n")
{
return object->getStateOn();
}I'll leave it up to GG to decide whether they want to include this - or just give the *.getValue() function a little more explanation in comments regarding it's use with toggleButton.
Rex Hiebert
3Dmotif LLC