Fixes after feedback from Luis.

* Made use of dStrIsEmpty in more locations (and fixed it :P)
 * Removed commented-out code
 * Corrected default params
 * Fixed some console warning formats
 * Removed tabs
 * Corrected setExtent API
This commit is contained in:
Daniel Buckmaster 2014-12-23 18:20:47 +11:00
parent 04ff04a95f
commit 3ab048c5b0
30 changed files with 130 additions and 110 deletions

View file

@ -2052,10 +2052,9 @@ ConsoleDocFragment _popDialog2(
"void popDialog();"
);
DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), , "(GuiControl ctrl=NULL)"
DefineConsoleMethod( GuiCanvas, popDialog, void, (GuiControl * gui), (NULL), "(GuiControl ctrl=NULL)"
"@hide")
{
if (gui)
object->popDialogControl(gui);
else

View file

@ -2810,12 +2810,19 @@ static ConsoleDocFragment _sGuiControlSetExtent2(
"GuiControl", // The class to place the method in; use NULL for functions.
"void setExtent( Point2I p );" ); // The definition string.
//ConsoleMethod( GuiControl, setExtent, void, 3, 4,
DefineConsoleMethod( GuiControl, setExtent, void, ( Point2I ext ), ,
" Set the width and height of the control.\n\n"
DefineConsoleMethod( GuiControl, setExtent, void, ( const char* extOrX, const char* y ), (""),
"( Point2I p | int x, int y ) Set the width and height of the control.\n\n"
"@hide" )
{
object->setExtent( (S32)ext.x, (S32)ext.y );
Point2I extent;
if(!dStrIsEmpty(extOrX) && dStrIsEmpty(y))
dSscanf(extOrX, "%f %f", &extent.x, &extent.y);
else if(!dStrIsEmpty(extOrX) && !dStrIsEmpty(y))
{
extent.x = dAtof(extOrX);
extent.y = dAtof(y);
}
object->setExtent( extent );
}
//-----------------------------------------------------------------------------