fill in the validated variables

This commit is contained in:
AzaezelX 2025-03-09 11:53:23 -05:00
parent fa760fa746
commit f633ef3a3d
184 changed files with 1359 additions and 1216 deletions

View file

@ -39,6 +39,7 @@
#include "gui/core/guiDefaultControlRender.h"
#include "gui/editor/guiEditCtrl.h"
#include "gfx/gfxDrawUtil.h"
#include "console/typeValidators.h"
//#define DEBUG_SPEW
@ -306,7 +307,7 @@ void GuiControl::initPersistFields()
"Control profile to use when rendering tooltips for this control." );
addField("tooltip", TypeRealString, Offset(mTooltip, GuiControl),
"String to show in tooltip for this control." );
addField("hovertime", TypeS32, Offset(mTipHoverTime, GuiControl),
addFieldV("hovertime", TypeRangedS32, Offset(mTipHoverTime, GuiControl), &CommonValidators::PositiveInt,
"Time for mouse to hover over control until tooltip is shown (in milliseconds)." );
endGroup( "ToolTip" );

View file

@ -34,6 +34,7 @@
#include "sfx/sfxTrack.h"
#include "sfx/sfxTypes.h"
#include "console/engineAPI.h"
#include "console/typeValidators.h"
//#define DEBUG_SPEW
@ -370,9 +371,9 @@ void GuiControlProfile::initPersistFields()
addField("fillColorNA", TypeColorI, Offset(mFillColorNA, GuiControlProfile));
addField("fillColorERR", TypeColorI, Offset(mFillColorERR, GuiControlProfile));
addField("fillColorSEL", TypeColorI, Offset(mFillColorSEL, GuiControlProfile));
addField("border", TypeS32, Offset(mBorder, GuiControlProfile),
addFieldV("border", TypeRangedS32, Offset(mBorder, GuiControlProfile), &CommonValidators::PositiveInt,
"Border type (0=no border)." );
addField("borderThickness",TypeS32, Offset(mBorderThickness, GuiControlProfile),
addFieldV("borderThickness", TypeRangedS32, Offset(mBorderThickness, GuiControlProfile), &CommonValidators::PositiveInt,
"Thickness of border in pixels." );
addField("borderColor", TypeColorI, Offset(mBorderColor, GuiControlProfile),
"Color to draw border with." );
@ -394,7 +395,7 @@ void GuiControlProfile::initPersistFields()
addField("fontType", TypeString, Offset(mFontType, GuiControlProfile),
"Name of font family and typeface (e.g. \"Arial Bold\")." );
addField("fontSize", TypeS32, Offset(mFontSize, GuiControlProfile),
addFieldV("fontSize", TypeRangedS32, Offset(mFontSize, GuiControlProfile), &CommonValidators::PositiveInt,
"Font size in points." );
addField("fontCharset", TYPEID< FontCharset >(), Offset(mFontCharset, GuiControlProfile) );
addField("fontColors", TypeColorI, Offset(mFontColors, GuiControlProfile), ColorMax,