mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-25 01:23:52 +00:00
Fix specific usage of Con::executef where it was not being assigned to a ConsoleValue before getting it's data out of it.
This commit is contained in:
parent
0f89373782
commit
755bbacaa0
13 changed files with 35 additions and 21 deletions
|
|
@ -637,7 +637,9 @@ void GuiTreeViewCtrl::Item::getTooltipText(U32 bufLen, char *buf)
|
|||
method += pClassName;
|
||||
if(mParentControl->isMethod(method.c_str()))
|
||||
{
|
||||
const char* tooltip = Con::executef( mParentControl, method.c_str(), pObject->getIdString() );
|
||||
ConsoleValue cValue = Con::executef( mParentControl, method.c_str(), pObject->getIdString() );
|
||||
const char* tooltip = cValue.getString();
|
||||
|
||||
dsize_t len = dStrlen(buf);
|
||||
S32 newBufLen = bufLen-len;
|
||||
if(dStrlen(tooltip) > 0 && newBufLen > 0)
|
||||
|
|
|
|||
|
|
@ -226,7 +226,9 @@ void GuiPopupMenuTextListCtrl::onMouseUp(const GuiEvent &event)
|
|||
if (item)
|
||||
{
|
||||
if (item->mEnabled)
|
||||
dAtob(Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : ""));
|
||||
{
|
||||
Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -288,7 +288,8 @@ bool PopupMenu::canHandleID(U32 id)
|
|||
|
||||
bool PopupMenu::handleSelect(U32 command, const char *text /* = NULL */)
|
||||
{
|
||||
return dAtob(Con::executef(this, "onSelectItem", Con::getIntArg(command), text ? text : ""));
|
||||
ConsoleValue cValue = Con::executef(this, "onSelectItem", Con::getIntArg(command), text ? text : "");
|
||||
return cValue.getBool();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -461,7 +461,9 @@ bool WorldEditor::pasteSelection( bool dropSel )
|
|||
SimGroup *targetGroup = NULL;
|
||||
if( isMethod( "getNewObjectGroup" ) )
|
||||
{
|
||||
const char* targetGroupName = Con::executef( this, "getNewObjectGroup" );
|
||||
ConsoleValue cValue = Con::executef( this, "getNewObjectGroup" );
|
||||
const char* targetGroupName = cValue.getString();
|
||||
|
||||
if( targetGroupName && targetGroupName[ 0 ] && !Sim::findObject( targetGroupName, targetGroup) )
|
||||
Con::errorf( "WorldEditor::pasteSelection() - no SimGroup called '%s'", targetGroupName );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue