mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-26 10:03:48 +00:00
Updates the field types used in the editor to utilize the GuiPopUpMenuCtrlEx to make them support categories and be able to search filter them
Updates the dataBlock field type to properly present categorized listings Expands the datablock Field to have an edit and add buttons on the field to make the workflow simpler Adds utility functions to GuiPopUpMenuCtrlEx to control indentation, categories and searchability Expands datablock editor functionality to be able to create a datablock of a type to pre-set the inheritFrom param of the process early(used for the add new button on DB fields to carry-through the current DB to the creation process of a derivative)
This commit is contained in:
parent
efffabae06
commit
d952722811
7 changed files with 205 additions and 35 deletions
|
|
@ -855,7 +855,7 @@ void GuiPopUpMenuCtrlEx::sortID()
|
|||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void GuiPopUpMenuCtrlEx::addEntry(const char *buf, S32 id, U32 scheme)
|
||||
void GuiPopUpMenuCtrlEx::addEntry(const char *buf, S32 id, U32 scheme, const bool& intented)
|
||||
{
|
||||
if( !buf )
|
||||
{
|
||||
|
|
@ -882,6 +882,7 @@ void GuiPopUpMenuCtrlEx::addEntry(const char *buf, S32 id, U32 scheme)
|
|||
dStrcpy( e.buf, buf, 256 );
|
||||
e.id = id;
|
||||
e.scheme = scheme;
|
||||
e.indented = intented;
|
||||
|
||||
// see if there is a shortcut key
|
||||
char * cp = dStrchr( e.buf, '~' );
|
||||
|
|
@ -1326,8 +1327,8 @@ void GuiPopUpMenuCtrlEx::closePopUp()
|
|||
mSelIndex = ( mRevNum >= mSelIndex && mSelIndex != -1 ) ? mRevNum - mSelIndex : mSelIndex;
|
||||
if ( mSelIndex != -1 )
|
||||
{
|
||||
if ( mReplaceText )
|
||||
setText(mTl->mList[mSelIndex].text);
|
||||
if (mReplaceText)
|
||||
setText(mEntries[mSelIndex].buf);
|
||||
|
||||
for(U32 i=0; i < mEntries.size(); i++)
|
||||
{
|
||||
|
|
@ -1465,7 +1466,12 @@ void GuiPopUpMenuCtrlEx::onAction()
|
|||
}
|
||||
else
|
||||
{
|
||||
mTl->addEntry(mEntries[j].id, mEntries[j].buf);
|
||||
String entryText = mEntries[j].buf;
|
||||
|
||||
if(mEntries[j].indented)
|
||||
entryText = String(" ") + entryText;
|
||||
|
||||
mTl->addEntry(mEntries[j].id, entryText.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue