mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Changes for BaseUI Update
This commit is contained in:
parent
90951b3cc8
commit
ed36cf2c5c
20 changed files with 156 additions and 45 deletions
|
|
@ -98,7 +98,7 @@ EndImplementEnumType;
|
|||
GuiButtonBaseCtrl::GuiButtonBaseCtrl()
|
||||
{
|
||||
mDepressed = false;
|
||||
mMouseOver = false;
|
||||
mHighlighted = false;
|
||||
mActive = true;
|
||||
static StringTableEntry sButton = StringTable->insert( "Button" );
|
||||
mButtonText = sButton;
|
||||
|
|
@ -288,14 +288,14 @@ void GuiButtonBaseCtrl::onMouseEnter(const GuiEvent &event)
|
|||
if(isMouseLocked())
|
||||
{
|
||||
mDepressed = true;
|
||||
mMouseOver = true;
|
||||
mHighlighted = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mActive && mProfile->mSoundButtonOver )
|
||||
SFX->playOnce(mProfile->mSoundButtonOver);
|
||||
|
||||
mMouseOver = true;
|
||||
mHighlighted = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ void GuiButtonBaseCtrl::onMouseLeave(const GuiEvent &)
|
|||
onMouseLeave_callback();
|
||||
if( isMouseLocked() )
|
||||
mDepressed = false;
|
||||
mMouseOver = false;
|
||||
mHighlighted = false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -542,3 +542,17 @@ DefineEngineMethod( GuiButtonBaseCtrl, resetState, void, (),,
|
|||
{
|
||||
object->resetState();
|
||||
}
|
||||
|
||||
DefineEngineMethod(GuiButtonBaseCtrl, setHighlighted, void, (bool highlighted), (false),
|
||||
"Reset the mousing state of the button.\n\n"
|
||||
"This method should not generally be called.")
|
||||
{
|
||||
object->setHighlighted(highlighted);
|
||||
}
|
||||
|
||||
DefineEngineMethod(GuiButtonBaseCtrl, isHighlighted, bool, (),,
|
||||
"Reset the mousing state of the button.\n\n"
|
||||
"This method should not generally be called.")
|
||||
{
|
||||
return object->isHighlighted();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue