mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
Merge branch 'development' into imageAsset_refactor_rev3
This commit is contained in:
commit
0da0903599
4189 changed files with 29881 additions and 635347 deletions
|
|
@ -2169,7 +2169,7 @@ void GuiCanvas::setFirstResponder( GuiControl* newResponder )
|
|||
if( oldResponder && ( oldResponder != newResponder ) )
|
||||
oldResponder->onLoseFirstResponder();
|
||||
|
||||
if( newResponder && ( newResponder != oldResponder ) )
|
||||
if( newResponder && ( newResponder != oldResponder ) && newResponder->isProperlyAdded())
|
||||
newResponder->onGainFirstResponder();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "gui/core/guiDefaultControlRender.h"
|
||||
#include "gui/editor/guiEditCtrl.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "console/typeValidators.h"
|
||||
|
||||
|
||||
//#define DEBUG_SPEW
|
||||
|
|
@ -306,7 +307,7 @@ void GuiControl::initPersistFields()
|
|||
"Control profile to use when rendering tooltips for this control." );
|
||||
addField("tooltip", TypeRealString, Offset(mTooltip, GuiControl),
|
||||
"String to show in tooltip for this control." );
|
||||
addField("hovertime", TypeS32, Offset(mTipHoverTime, GuiControl),
|
||||
addFieldV("hovertime", TypeRangedS32, Offset(mTipHoverTime, GuiControl), &CommonValidators::PositiveInt,
|
||||
"Time for mouse to hover over control until tooltip is shown (in milliseconds)." );
|
||||
endGroup( "ToolTip" );
|
||||
|
||||
|
|
@ -2230,10 +2231,10 @@ void GuiControl::setFirstResponder( GuiControl* firstResponder )
|
|||
|
||||
void GuiControl::setFirstResponder()
|
||||
{
|
||||
if( mAwake && mVisible )
|
||||
if( mAwake && mVisible && isProperlyAdded())
|
||||
{
|
||||
GuiControl *parent = getParent();
|
||||
if ( mProfile->mCanKeyFocus == true && parent != NULL )
|
||||
if ( mProfile->mCanKeyFocus == true && parent && parent->isProperlyAdded())
|
||||
parent->setFirstResponder( this );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ class GuiControl : public SimGroup
|
|||
GuiControl *getFirstResponder() { return mFirstResponder; }
|
||||
|
||||
/// Occurs when the control gains first-responder status.
|
||||
virtual void onGainFirstResponder();
|
||||
void onGainFirstResponder();
|
||||
|
||||
/// Occurs when the control loses first-responder status.
|
||||
virtual void onLoseFirstResponder();
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "sfx/sfxTrack.h"
|
||||
#include "sfx/sfxTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "console/typeValidators.h"
|
||||
|
||||
//#define DEBUG_SPEW
|
||||
|
||||
|
|
@ -370,9 +371,9 @@ void GuiControlProfile::initPersistFields()
|
|||
addField("fillColorNA", TypeColorI, Offset(mFillColorNA, GuiControlProfile));
|
||||
addField("fillColorERR", TypeColorI, Offset(mFillColorERR, GuiControlProfile));
|
||||
addField("fillColorSEL", TypeColorI, Offset(mFillColorSEL, GuiControlProfile));
|
||||
addField("border", TypeS32, Offset(mBorder, GuiControlProfile),
|
||||
addFieldV("border", TypeRangedS32, Offset(mBorder, GuiControlProfile), &CommonValidators::S32Range,
|
||||
"Border type (0=no border)." );
|
||||
addField("borderThickness",TypeS32, Offset(mBorderThickness, GuiControlProfile),
|
||||
addFieldV("borderThickness", TypeRangedS32, Offset(mBorderThickness, GuiControlProfile), &CommonValidators::PositiveInt,
|
||||
"Thickness of border in pixels." );
|
||||
addField("borderColor", TypeColorI, Offset(mBorderColor, GuiControlProfile),
|
||||
"Color to draw border with." );
|
||||
|
|
@ -394,7 +395,7 @@ void GuiControlProfile::initPersistFields()
|
|||
|
||||
addField("fontType", TypeString, Offset(mFontType, GuiControlProfile),
|
||||
"Name of font family and typeface (e.g. \"Arial Bold\")." );
|
||||
addField("fontSize", TypeS32, Offset(mFontSize, GuiControlProfile),
|
||||
addFieldV("fontSize", TypeRangedS32, Offset(mFontSize, GuiControlProfile), &CommonValidators::PositiveInt,
|
||||
"Font size in points." );
|
||||
addField("fontCharset", TYPEID< FontCharset >(), Offset(mFontCharset, GuiControlProfile) );
|
||||
addField("fontColors", TypeColorI, Offset(mFontColors, GuiControlProfile), ColorMax,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue