diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-06-17 19:11:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-17 19:11:28 +0200 |
commit | 8f7785771b9e02b1a1daf7a252550d78ea93053d (patch) | |
tree | 7a4e4b524dbc63fed3dac99a3844b634cc621d0d /src/intlGUIEditBox.h | |
parent | 76be103a91d6987527af19e87d93007be8ba8a67 (diff) | |
download | minetest-8f7785771b9e02b1a1daf7a252550d78ea93053d.tar.xz |
Cpp11 initializers 2 (#5999)
* C++11 patchset 10: continue cleanup on constructors
* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)
* More classes cleanup
* More classes cleanup + change NULL tests to boolean tests
Diffstat (limited to 'src/intlGUIEditBox.h')
-rw-r--r-- | src/intlGUIEditBox.h | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/src/intlGUIEditBox.h b/src/intlGUIEditBox.h index bb617476c..e3fc2755b 100644 --- a/src/intlGUIEditBox.h +++ b/src/intlGUIEditBox.h @@ -145,29 +145,36 @@ namespace gui bool processMouse(const SEvent& event); s32 getCursorPos(s32 x, s32 y); - bool MouseMarking; + bool MouseMarking = false; bool Border; - bool OverrideColorEnabled; - s32 MarkBegin; - s32 MarkEnd; - - video::SColor OverrideColor; - gui::IGUIFont *OverrideFont, *LastBreakFont; - IOSOperator* Operator; - - u64 BlinkStartTime; - s32 CursorPos; - s32 HScrollPos, VScrollPos; // scroll position in characters - u32 Max; - - bool WordWrap, MultiLine, AutoScroll, PasswordBox; - wchar_t PasswordChar; - EGUI_ALIGNMENT HAlign, VAlign; - - core::array< core::stringw > BrokenText; - core::array< s32 > BrokenTextPositions; - - core::rect<s32> CurrentTextRect, FrameRect; // temporary values + bool OverrideColorEnabled = false; + s32 MarkBegin = 0; + s32 MarkEnd = 0; + + video::SColor OverrideColor = video::SColor(101,255,255,255); + gui::IGUIFont *OverrideFont = nullptr; + gui::IGUIFont *LastBreakFont = nullptr; + IOSOperator *Operator = nullptr; + + u64 BlinkStartTime = 0; + s32 CursorPos = 0; + s32 HScrollPos = 0; + s32 VScrollPos = 0; // scroll position in characters + u32 Max = 0; + + bool WordWrap = false; + bool MultiLine = false; + bool AutoScroll = true; + bool PasswordBox = false; + wchar_t PasswordChar = L'*'; + EGUI_ALIGNMENT HAlign = EGUIA_UPPERLEFT; + EGUI_ALIGNMENT VAlign = EGUIA_CENTER; + + core::array<core::stringw> BrokenText; + core::array<s32> BrokenTextPositions; + + core::rect<s32> CurrentTextRect = core::rect<s32>(0,0,1,1); + core::rect<s32> FrameRect; // temporary values }; |