mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
- Reimplements autosave logic to handle levels, subscenes and terrains in a more consistent, reliable way.
- Adds entry to RMB menu in Asset Browser to restore an asset to a backup copy taken from autosaves - Adds reparent out-of-bounds objects button to SceneGroup inspector - Adds ability to have SubScene have a different loading bounds from the actual subscene bounds, allowing load triggering to happen ahead of the bounds of the subscene itself - Fixes asset importer handling of animFPS field to be the correct type - Adds onInspect handling to GameBase allowing better handling for any game class type with editor integration - Add getAssetLooseFileCount and getAssetLooseFile to AssetManager to be able to iterate over all loose files associated to an asset - Add standard/default preload function def to forestItem - Fixes handling of text placement on GuiIconButtonCtrl when text is set to the right - Adds setGlobalCenter utility function - Adds ability to set guiInputCtrl active state - Matched util functions for tracking if left and right mouse buttons are down to EditTSCtrl alongside the existing middle mouse - Add empty element sanity check to appMesh loader - Add callback for GameBase when game is created - Add default graphics options config for steamdeck - Fix typo in assetImportConfig default - Filters SceneGroup utility buttons in inspector to only show for relevent class types
This commit is contained in:
parent
70502d1b0f
commit
bb7ee38bf4
33 changed files with 978 additions and 237 deletions
|
|
@ -382,7 +382,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
|
|||
Point2I start( mTextMargin, ( getHeight() - mProfile->mFont->getHeight() ) / 2 );
|
||||
if (mBitmapAsset.notNull() && mIconLocation != IconLocNone)
|
||||
{
|
||||
start.x = iconRect.extent.x + mButtonMargin.x + mTextMargin;
|
||||
start.x = getWidth() - (iconRect.extent.x + mButtonMargin.x + textWidth);
|
||||
}
|
||||
|
||||
drawer->setBitmapModulation(fontColor);
|
||||
|
|
|
|||
|
|
@ -2855,6 +2855,23 @@ DefineEngineMethod( GuiControl, getGlobalCenter, Point2I, (),,
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineMethod(GuiControl, setGlobalCenter, void, (S32 x, S32 y), ,
|
||||
"Set the coordinate of the control's center point in coordinates relative to the root control in its control hierarchy.\n"
|
||||
"@param x The X coordinate of the new center point of the control relative to the root control's.\n"
|
||||
"@param y The Y coordinate of the new center point of the control relative to the root control's.")
|
||||
{
|
||||
//see if we can turn the x/y into ints directly,
|
||||
Point2I lPosOffset = object->globalToLocalCoord(Point2I(x, y));
|
||||
|
||||
lPosOffset += object->getPosition();
|
||||
|
||||
const Point2I ext = object->getExtent();
|
||||
Point2I newpos(lPosOffset.x - ext.x / 2, lPosOffset.y - ext.y / 2);
|
||||
object->setPosition(newpos);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
DefineEngineMethod( GuiControl, getGlobalPosition, Point2I, (),,
|
||||
"Get the position of the control relative to the root of the GuiControl hierarchy it is contained in.\n"
|
||||
"@return The control's current position in root-relative coordinates." )
|
||||
|
|
|
|||
|
|
@ -133,6 +133,25 @@ void GuiInputCtrl::onSleep()
|
|||
clearFirstResponder();
|
||||
}
|
||||
|
||||
void GuiInputCtrl::setActive(bool value)
|
||||
{
|
||||
Parent::setActive(value);
|
||||
|
||||
if (value)
|
||||
{
|
||||
if (!smDesignTime && !mIgnoreMouseEvents)
|
||||
mouseLock();
|
||||
|
||||
setFirstResponder();
|
||||
}
|
||||
else
|
||||
{
|
||||
mouseUnlock();
|
||||
clearFirstResponder();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
static bool isModifierKey( U16 keyCode )
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ public:
|
|||
bool onWake() override;
|
||||
void onSleep() override;
|
||||
|
||||
virtual void setActive(bool state);
|
||||
|
||||
bool onInputEvent( const InputEventInfo &event ) override;
|
||||
|
||||
static void initPersistFields();
|
||||
|
|
|
|||
|
|
@ -1409,3 +1409,13 @@ DefineEngineMethod( EditTSCtrl, isMiddleMouseDown, bool, (),, "" )
|
|||
{
|
||||
return object->isMiddleMouseDown();
|
||||
}
|
||||
|
||||
DefineEngineMethod(EditTSCtrl, isLeftMouseDown, bool, (), , "")
|
||||
{
|
||||
return object->isLeftMouseDown();
|
||||
}
|
||||
|
||||
DefineEngineMethod(EditTSCtrl, isRightMouseDown, bool, (), , "")
|
||||
{
|
||||
return object->isRightMouseDown();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,7 +189,9 @@ class EditTSCtrl : public GuiTSCtrl
|
|||
virtual void on3DMouseWheelDown(const Gui3DMouseEvent &){};
|
||||
virtual void get3DCursor(GuiCursor *&cursor, bool &visible, const Gui3DMouseEvent &);
|
||||
|
||||
virtual bool isLeftMouseDown() { return mLeftMouseDown; }
|
||||
virtual bool isMiddleMouseDown() {return mMiddleMouseDown;}
|
||||
virtual bool isRightMouseDown() { return mLeftMouseDown; }
|
||||
|
||||
bool resize(const Point2I& newPosition, const Point2I& newExtent) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue