Commit c2670ddc authored by hybrid's avatar hybrid

Fixed reorder warning and indentation.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@748 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4996342b
...@@ -21,8 +21,9 @@ namespace gui ...@@ -21,8 +21,9 @@ namespace gui
CGUISpinBox::CGUISpinBox(const wchar_t* text, IGUIEnvironment* environment, CGUISpinBox::CGUISpinBox(const wchar_t* text, IGUIEnvironment* environment,
IGUIElement* parent, s32 id, const core::rect<s32>& rectangle) IGUIElement* parent, s32 id, const core::rect<s32>& rectangle)
: IGUISpinBox(environment, parent, id, rectangle), : IGUISpinBox(environment, parent, id, rectangle),
ButtonSpinUp(0), ButtonSpinDown(0), EditBox(0), ButtonSpinUp(0), ButtonSpinDown(0), StepSize(1.f),
StepSize(1.f), RangeMin(-FLT_MAX), RangeMax(FLT_MAX), FormatString(L"%f"), DecimalPlaces(-1) RangeMin(-FLT_MAX), RangeMax(FLT_MAX), FormatString(L"%f"),
DecimalPlaces(-1)
{ {
s32 ButtonWidth = 16; s32 ButtonWidth = 16;
IGUISpriteBank *sb = 0; IGUISpriteBank *sb = 0;
...@@ -90,11 +91,7 @@ void CGUISpinBox::setValue(f32 val) ...@@ -90,11 +91,7 @@ void CGUISpinBox::setValue(f32 val)
{ {
wchar_t str[100]; wchar_t str[100];
#ifdef _IRR_WINDOWS_
_snwprintf(str, 99, FormatString.c_str(), val);
#else
swprintf(str, 99, FormatString.c_str(), val); swprintf(str, 99, FormatString.c_str(), val);
#endif
EditBox->setText(str); EditBox->setText(str);
verifyValueRange(); verifyValueRange();
} }
......
...@@ -77,17 +77,18 @@ namespace gui ...@@ -77,17 +77,18 @@ namespace gui
protected: protected:
virtual void verifyValueRange(); virtual void verifyValueRange();
core::stringw FormatString;
s32 DecimalPlaces;
IGUIEditBox * EditBox; IGUIEditBox * EditBox;
IGUIButton * ButtonSpinUp; IGUIButton * ButtonSpinUp;
IGUIButton * ButtonSpinDown; IGUIButton * ButtonSpinDown;
f32 StepSize; f32 StepSize;
f32 RangeMin; f32 RangeMin;
f32 RangeMax; f32 RangeMax;
core::stringw FormatString;
s32 DecimalPlaces;
}; };
} // end namespace gui } // end namespace gui
} // end namespace irr } // end namespace irr
#endif // __C_GUI_SPIN_BOX_H_INCLUDED__ #endif // __C_GUI_SPIN_BOX_H_INCLUDED__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment