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

This commit is contained in:
Areloch 2021-09-10 02:20:13 -05:00
commit dec9f54a9b
322 changed files with 10473 additions and 10241 deletions

View file

@ -361,10 +361,8 @@ void GuiGameListMenuCtrl::onRenderSliderOption(Row* row, Point2I currentOffset)
// calculate text to be at the center between the arrows
GFont* font = profile->mFont;
ConsoleValue val;
val.setFloatValue(row->mValue);
const char* stringVal = val.getStringValue();
char stringVal[32];
dSprintf(stringVal, 32, "%f", row->mValue);
S32 textWidth = font->getStrWidth(stringVal);
S32 columnWidth = profile->mHitAreaLowerRight.x * xScale - profile->mRightPad - columnSplit;

View file

@ -319,7 +319,7 @@ void GuiControl::initPersistFields()
//-----------------------------------------------------------------------------
bool GuiControl::processArguments(S32 argc, ConsoleValueRef *argv)
bool GuiControl::processArguments(S32 argc, ConsoleValue *argv)
{
// argv[0] - The GuiGroup to add this control to when it's created.
// this is an optional parameter that may be specified at

View file

@ -341,7 +341,7 @@ class GuiControl : public SimGroup
GuiControl();
virtual ~GuiControl();
virtual bool processArguments(S32 argc, ConsoleValueRef *argv);
virtual bool processArguments(S32 argc, ConsoleValue *argv);
static void initPersistFields();
static void consoleInit();

View file

@ -83,7 +83,7 @@ DefineEngineStringlyVariadicMethod( GuiFilterCtrl, setValue, void, 3, 20, "(f1,
{
Filter filter;
StringStackWrapper args(argc - 2, argv + 2);
ConsoleValueToStringArrayWrapper args(argc - 2, argv + 2);
filter.set(args.count(), args);
object->set(filter);

View file

@ -318,7 +318,8 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
{
char buffer[ 2048 ];
expandEscape( buffer, newValue );
newValue = (const char*)Con::evaluatef( "%%f = \"%s\"; return ( %s );", oldValue.c_str(), buffer );
newValue = (const char*)Con::evaluatef( "$f = \"%s\"; return ( %s );", oldValue.c_str(), buffer );
Con::evaluatef("$f=0;");
}
else if( type == TypeS32Vector
|| type == TypeF32Vector
@ -353,9 +354,10 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
char buffer[ 2048 ];
expandEscape( buffer, newComponentExpr );
const char* newComponentVal = Con::evaluatef( "%%f = \"%s\"; %%v = \"%s\"; return ( %s );",
const char* newComponentVal = Con::evaluatef( "$f = \"%s\"; $v = \"%s\"; return ( %s );",
oldComponentVal, oldValue.c_str(), buffer );
Con::evaluatef("$f=0;$v=0;");
if( !isFirst )
strNew.append( ' ' );
strNew.append( newComponentVal );

View file

@ -120,12 +120,14 @@ void PopupMenu::handleSelectEvent(U32 popID, U32 command)
//-----------------------------------------------------------------------------
bool PopupMenu::onMessageReceived(StringTableEntry queue, const char* event, const char* data)
{
return Con::executef(this, "onMessageReceived", queue, event, data);
ConsoleValue returnValue = Con::executef(this, "onMessageReceived", queue, event, data);
return returnValue.getBool();
}
bool PopupMenu::onMessageObjectReceived(StringTableEntry queue, Message *msg )
{
return Con::executef(this, "onMessageReceived", queue, Con::getIntArg(msg->getId()));
ConsoleValue returnValue = Con::executef(this, "onMessageReceived", queue, Con::getIntArg(msg->getId()));
return returnValue.getBool();
}
//////////////////////////////////////////////////////////////////////////

View file

@ -2861,17 +2861,17 @@ void WorldEditor::initPersistFields()
//------------------------------------------------------------------------------
// These methods are needed for the console interfaces.
void WorldEditor::ignoreObjClass( U32 argc, ConsoleValueRef *argv )
void WorldEditor::ignoreObjClass( U32 argc, ConsoleValue *argv )
{
for(S32 i = 2; i < argc; i++)
{
ClassInfo::Entry * entry = getClassEntry(argv[i]);
ClassInfo::Entry * entry = getClassEntry(argv[i].getString());
if(entry)
entry->mIgnoreCollision = true;
else
{
entry = new ClassInfo::Entry;
entry->mName = StringTable->insert(argv[i]);
entry->mName = StringTable->insert(argv[i].getString());
entry->mIgnoreCollision = true;
if(!addClassEntry(entry))
delete entry;

View file

@ -76,7 +76,7 @@ class WorldEditor : public EditTSCtrl
Point3F p2;
};
void ignoreObjClass(U32 argc, ConsoleValueRef* argv);
void ignoreObjClass(U32 argc, ConsoleValue* argv);
void clearIgnoreList();
static bool setObjectsUseBoxCenter( void *object, const char *index, const char *data ) { static_cast<WorldEditor*>(object)->setObjectsUseBoxCenter( dAtob( data ) ); return false; };