mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Removed hard coded directory paths
- Removed references to core directory. - Switch some references to tools directory - Added preferences variables where appropriate
This commit is contained in:
parent
853b70255b
commit
4b1334db9f
25 changed files with 75 additions and 18 deletions
|
|
@ -39,9 +39,9 @@ ConsoleDocClass( GuiSwatchButtonCtrl,
|
|||
"A swatch button is a push button that uses its color field to designate the color drawn over an image, on top of a button.\n\n"
|
||||
|
||||
"The color itself is a float value stored inside the GuiSwatchButtonCtrl::color field. The texture path that represents\n"
|
||||
"the image underlying the color is stored inside the GuiSwatchButtonCtrl::bitmap field.\n"
|
||||
"the image underlying the color is stored inside the GuiSwatchButtonCtrl::gridBitmap field.\n"
|
||||
"The default value assigned toGuiSwatchButtonCtrl::color is \"1 1 1 1\"( White ). The default/fallback image assigned to \n"
|
||||
"GuiSwatchButtonCtrl::bitmap is \"core/art/gui/images/transp_grid\".\n\n"
|
||||
"GuiSwatchButtonCtrl::gridBitmap is \"tools/gui/images/transp_grid\".\n\n"
|
||||
|
||||
"@tsexample\n"
|
||||
"// Create a GuiSwatchButtonCtrl that calls randomFunction with its current color when clicked\n"
|
||||
|
|
@ -65,11 +65,15 @@ GuiSwatchButtonCtrl::GuiSwatchButtonCtrl()
|
|||
|
||||
static StringTableEntry sProfile = StringTable->insert( "profile" );
|
||||
setDataField( sProfile, NULL, "GuiInspectorSwatchButtonProfile" );
|
||||
|
||||
mGridBitmap = "tools/gui/images/transp_grid";
|
||||
}
|
||||
|
||||
void GuiSwatchButtonCtrl::initPersistFields()
|
||||
{
|
||||
addField( "color", TypeColorF, Offset( mSwatchColor, GuiSwatchButtonCtrl ), "The foreground color of GuiSwatchButtonCtrl" );
|
||||
|
||||
addField( "gridBitmap", TypeString, Offset( mGridBitmap, GuiSwatchButtonCtrl ), "The bitmap used for the transparent grid" );
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
|
@ -80,7 +84,7 @@ bool GuiSwatchButtonCtrl::onWake()
|
|||
return false;
|
||||
|
||||
if ( mGrid.isNull() )
|
||||
mGrid.set( "core/art/gui/images/transp_grid", &GFXDefaultGUIProfile, avar("%s() - mGrid (line %d)", __FUNCTION__, __LINE__) );
|
||||
mGrid.set( mGridBitmap, &GFXDefaultGUIProfile, avar("%s() - mGrid (line %d)", __FUNCTION__, __LINE__) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue