Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into alpha40/imageArrayProfileFixes

This commit is contained in:
AzaezelX 2021-11-03 12:48:47 -05:00
commit 69afd3d370
9 changed files with 19 additions and 11 deletions

View file

@ -485,6 +485,13 @@ U32 tabComplete(char* inputBuffer, U32 cursorPos, U32 maxResultLength, bool forw
}
completionBaseStart = p;
completionBaseLen = cursorPos - p;
// Bail if we end up at start of string
if (p == 0)
{
return cursorPos;
}
// Is this function being invoked on an object?
if (inputBuffer[p - 1] == '.')
{

View file

@ -42,7 +42,7 @@ private:
protected:
DECLARE_IMAGEASSET(GuiIconButtonCtrl, Bitmap, onImageChanged, GFXTexturePersistentSRGBProfile);
DECLARE_IMAGEASSET(GuiIconButtonCtrl, Bitmap, onImageChanged, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiIconButtonCtrl, Bitmap);
S32 mIconLocation;

View file

@ -39,11 +39,11 @@ private:
protected:
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, NormalBitmap, onNormalImageChanged, GFXTexturePersistentSRGBProfile);
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, NormalBitmap, onNormalImageChanged, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, NormalBitmap);
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, LoweredBitmap, onLoweredImageChanged, GFXTexturePersistentSRGBProfile);
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, LoweredBitmap, onLoweredImageChanged, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, LoweredBitmap);
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, HoverBitmap, onHoverImageChanged, GFXTexturePersistentSRGBProfile);
DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, HoverBitmap, onHoverImageChanged, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiToolboxButtonCtrl, HoverBitmap);
void renderButton(GFXTexHandle &texture, Point2I &offset, const RectI& updateRect);

View file

@ -1880,7 +1880,7 @@ bool GuiTreeViewCtrl::buildIconTable(const char * icons)
dStrncpy( buf, start, getMin( sizeof( buf ) / sizeof( buf[ 0 ] ) - 1, len ) );
buf[ len ] = '\0';
mIconTable[ numIcons ] = GFXTexHandle( buf, &GFXTexturePersistentProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
mIconTable[ numIcons ] = GFXTexHandle( buf, &GFXDefaultGUIProfile, avar( "%s() - mIconTable[%d] (line %d)", __FUNCTION__, numIcons, __LINE__ ) );
}
else
mIconTable[ numIcons ] = GFXTexHandle();

View file

@ -68,7 +68,7 @@ GFX_ImplementTextureProfile(GFXGuiCursorProfile,
GFX_ImplementTextureProfile(GFXDefaultGUIProfile,
GFXTextureProfile::DiffuseMap,
GFXTextureProfile::PreserveSize |
GFXTextureProfile::Static | GFXTextureProfile::SRGB |
GFXTextureProfile::Static | GFXTextureProfile::KeepBitmap | GFXTextureProfile::SRGB |
GFXTextureProfile::NoPadding,
GFXTextureProfile::NONE);

View file

@ -455,7 +455,7 @@ public:
StringTableEntry mBitmapName;
StringTableEntry mBitmapAssetId;
AssetPtr<ImageAsset> mBitmapAsset;
GFXTextureProfile* mBitmapProfile = &GFXTexturePersistentSRGBProfile;
GFXTextureProfile* mBitmapProfile = &GFXDefaultGUIProfile;
public:
const StringTableEntry getBitmapFile() const { return mBitmapName; }
void setBitmapFile(const FileName& _in) { mBitmapName = StringTable->insert(_in.c_str()); }

View file

@ -25,7 +25,7 @@
#include "console/engineAPI.h"
#include "console/simBase.h"
#include "gui/core/guiTypes.h"
EditorIconRegistry gEditorIcons;
@ -60,7 +60,7 @@ void EditorIconRegistry::loadFromPath( const String &path, bool overwrite )
String defaultIconFile = path + "default";
mDefaultIcon.set( defaultIconFile,
&GFXTexturePersistentSRGBProfile,
&GFXDefaultGUIProfile,
avar("%s() - mIcons[] (line %d)",
__FUNCTION__, __LINE__) );
}
@ -68,7 +68,7 @@ void EditorIconRegistry::loadFromPath( const String &path, bool overwrite )
void EditorIconRegistry::add( const String &className, const String &imageFile, bool overwrite )
{
// First see if we can load the image.
GFXTexHandle icon( imageFile, &GFXTexturePersistentSRGBProfile,
GFXTexHandle icon( imageFile, &GFXDefaultGUIProfile,
avar("%s() - mIcons[] (line %d)", __FUNCTION__, __LINE__) );
if ( icon.isNull() )
return;

View file

@ -63,7 +63,7 @@ protected:
GFXStateBlockRef mBlendStateBlock;
GFXStateBlockRef mSolidStateBlock;
DECLARE_IMAGEASSET(GuiMissionAreaCtrl, HandleBitmap, onHandleBitmapChanged, GFXTexturePersistentSRGBProfile);
DECLARE_IMAGEASSET(GuiMissionAreaCtrl, HandleBitmap, onHandleBitmapChanged, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiMissionAreaCtrl, HandleBitmap);
Point2I mHandleTextureSize;

View file

@ -76,6 +76,7 @@
extern int x86UNIXClose(int fd);
extern ssize_t x86UNIXRead(int fd, void *buf, size_t nbytes);
extern ssize_t x86UNIXWrite(int fd, const void *buf, size_t nbytes);
extern bool ResolvePathCaseInsensitive(char* pathName, S32 pathNameSize, bool requiredAbsolute);
const int MaxPath = PATH_MAX;