Cyrus Mod Loader
Loading...
Searching...
No Matches
ControlEdit.h
1#pragma once
2#include <Cyrus/Classes/Window.h>
3#include <Cyrus/shared.h>
4
6
7#pragma pack(push, 1)
21class ControlEdit : public Window {
22private:
23 std::wstring m_sText; // 0x248
24 bool m_bEditing; // 0x268
25 bool pad_b; // 0x269
26 bool m_bDeleteOnFirstChar; // 0x26A
27 uint8_t pad; // 0x26B
28 int m_nMaxLength; // 0x26C
29 bool m_bPassword; // 0x270
30 bool m_bLog; // 0x271
31 bool m_bAllowPaste; // 0x272
32 bool m_previousNext; // 0x273
33 uint8_t pad_2[0x4C]; // 0x274
34 int m_nLogPosition; // 0x2C0
35 int pad_c; // 0x2C4
36 int m_nMaxLogSize; // 0x2C8
37 int m_nCursor; // 0x2CC
38 int m_nEditBegin; // 0x2D0
39 int m_nEditEnd; // 0x2D4
40 std::wstring m_sSavedText; // 0x2D8
41 float m_fCursorBlinkSpeed; // 0x2F8
42 float m_fCursorTimer; // 0x2FC
43 bool m_bCursorBlink; // 0x300
44 uint8_t pad_3[0x7]; // 0x301
45 double m_fMinRange; // 0x308
46 double m_fMaxRange; // 0x310
47 int m_nPrecision; // 0x318
48
49public:
55 CYRUS std::wstring getText() const;
56
62 CYRUS void setText(const std::wstring &text);
63
69 CYRUS bool isEditing() const;
70
76 CYRUS void setEditing(bool editing);
77
84 CYRUS bool isDeleteOnFirstChar() const;
85
92 CYRUS void setDeleteOnFirstChar(bool deleteOnFirstChar);
93
99 CYRUS int getMaxLength() const;
100
106 CYRUS void setMaxLength(int maxLength);
107
113 CYRUS bool isPasswordMode() const;
114
120 CYRUS void setPasswordMode(bool password);
121
127 CYRUS bool isLogMode() const;
128
134 CYRUS void setLogMode(bool log);
135
141 CYRUS bool isAllowPaste() const;
142
148 CYRUS void setAllowPaste(bool allowPaste);
149
155 CYRUS bool isPreviousNextEnabled() const;
156
163 CYRUS void setPreviousNextEnabled(bool previousNext);
164
170 CYRUS int getLogPosition() const;
171
177 CYRUS void setLogPosition(int logPosition);
178
184 CYRUS int getMaxLogSize() const;
185
191 CYRUS void setMaxLogSize(int maxLogSize);
192
198 CYRUS int getCursorPosition() const;
199
205 CYRUS void setCursorPosition(int cursorPosition);
206
212 CYRUS int getEditBegin() const;
213
219 CYRUS void setEditBegin(int editBegin);
220
226 CYRUS int getEditEnd() const;
227
233 CYRUS void setEditEnd(int editEnd);
234
240 CYRUS std::wstring getSavedText() const;
241
247 CYRUS void setSavedText(const std::wstring &savedText);
248
254 CYRUS float getCursorBlinkSpeed() const;
255
261 CYRUS void setCursorBlinkSpeed(float cursorBlinkSpeed);
262
268 CYRUS float getCursorTimer() const;
269
275 CYRUS void setCursorTimer(float cursorTimer);
276
282 CYRUS bool isCursorBlinking() const;
283
289 CYRUS void setCursorBlinking(bool cursorBlink);
290
296 CYRUS double getMinRange() const;
297
303 CYRUS void setMinRange(double minRange);
304
310 CYRUS double getMaxRange() const;
311
317 CYRUS void setMaxRange(double maxRange);
318
324 CYRUS int getPrecision() const;
325
331 CYRUS void setPrecision(int precision);
332
333private:
334 friend struct ControlEditLayout;
335};
336#pragma pack(pop)
337
341 DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bDeleteOnFirstChar, 0x26A);
355 DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_fCursorBlinkSpeed, 0x2F8);
362};
A class that represents an editable text control element in a window.
Definition ControlEdit.h:21
CYRUS void setMaxLogSize(int maxLogSize)
Set the maximum size of the log.
Definition ControlEdit.cpp:47
CYRUS bool isLogMode() const
Check if the control is in log mode.
Definition ControlEdit.cpp:25
CYRUS void setPasswordMode(bool password)
Set the password mode of the control.
Definition ControlEdit.cpp:23
CYRUS int getCursorPosition() const
Get the cursor position.
Definition ControlEdit.cpp:49
CYRUS int getEditBegin() const
Get the start position of the text being edited.
Definition ControlEdit.cpp:55
CYRUS bool isPreviousNextEnabled() const
Check if previous and next navigation is enabled.
Definition ControlEdit.cpp:33
CYRUS void setPrecision(int precision)
Set the precision value for the control.
Definition ControlEdit.cpp:97
CYRUS bool isDeleteOnFirstChar() const
Check if the text should be deleted on the first character input.
Definition ControlEdit.cpp:11
CYRUS void setPreviousNextEnabled(bool previousNext)
Set the previous and next navigation.
Definition ControlEdit.cpp:35
CYRUS int getEditEnd() const
Get the end position of the text being edited.
Definition ControlEdit.cpp:59
CYRUS void setMinRange(double minRange)
Set the minimum range value for the control.
Definition ControlEdit.cpp:89
CYRUS void setCursorTimer(float cursorTimer)
Set the cursor timer value.
Definition ControlEdit.cpp:77
CYRUS void setEditEnd(int editEnd)
Set the end position of the text being edited.
Definition ControlEdit.cpp:61
CYRUS int getMaxLogSize() const
Get the maximum size of the log.
Definition ControlEdit.cpp:45
CYRUS void setText(const std::wstring &text)
Set the text content of the control.
Definition ControlEdit.cpp:5
CYRUS bool isAllowPaste() const
Check if paste is allowed in the control.
Definition ControlEdit.cpp:29
CYRUS double getMaxRange() const
Get the maximum range value for the control.
Definition ControlEdit.cpp:91
CYRUS void setLogPosition(int logPosition)
Set the current log position.
Definition ControlEdit.cpp:41
CYRUS void setCursorBlinking(bool cursorBlink)
Set the cursor blinking state.
Definition ControlEdit.cpp:83
CYRUS float getCursorTimer() const
Get the cursor timer value.
Definition ControlEdit.cpp:75
CYRUS int getLogPosition() const
Get the current log position.
Definition ControlEdit.cpp:39
CYRUS void setMaxRange(double maxRange)
Set the maximum range value for the control.
Definition ControlEdit.cpp:93
CYRUS bool isPasswordMode() const
Check if the control is in password mode.
Definition ControlEdit.cpp:21
CYRUS void setCursorPosition(int cursorPosition)
Set the cursor position.
Definition ControlEdit.cpp:51
CYRUS void setSavedText(const std::wstring &savedText)
Set the saved text content.
Definition ControlEdit.cpp:65
CYRUS bool isCursorBlinking() const
Check if the cursor is blinking.
Definition ControlEdit.cpp:81
CYRUS float getCursorBlinkSpeed() const
Get the cursor blink speed.
Definition ControlEdit.cpp:69
CYRUS bool isEditing() const
Check if the control is in editing mode.
Definition ControlEdit.cpp:7
CYRUS double getMinRange() const
Get the minimum range value for the control.
Definition ControlEdit.cpp:87
CYRUS void setAllowPaste(bool allowPaste)
Set the paste allowance in the control.
Definition ControlEdit.cpp:31
CYRUS void setEditBegin(int editBegin)
Set the start position of the text being edited.
Definition ControlEdit.cpp:57
CYRUS void setMaxLength(int maxLength)
Set the maximum length of the text.
Definition ControlEdit.cpp:19
CYRUS std::wstring getText() const
Get the text content of the control.
Definition ControlEdit.cpp:3
CYRUS std::wstring getSavedText() const
Get the saved text content.
Definition ControlEdit.cpp:63
CYRUS void setEditing(bool editing)
Set the editing mode of the control.
Definition ControlEdit.cpp:9
CYRUS int getMaxLength() const
Get the maximum length of the text.
Definition ControlEdit.cpp:17
CYRUS void setLogMode(bool log)
Set the log mode of the control.
Definition ControlEdit.cpp:27
CYRUS int getPrecision() const
Get the precision value for the control.
Definition ControlEdit.cpp:95
CYRUS void setCursorBlinkSpeed(float cursorBlinkSpeed)
Set the cursor blink speed.
Definition ControlEdit.cpp:71
CYRUS void setDeleteOnFirstChar(bool deleteOnFirstChar)
Set the behavior to delete text on the first character input.
Definition ControlEdit.cpp:13
Represents a Wizard101 Window, think anything you see on screen that is not a 3D model.
Definition Window.h:45
Definition ControlEdit.h:338
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_sSavedText, 0x2D8)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bCursorBlink, 0x300)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nCursor, 0x2CC)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bEditing, 0x268)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_fCursorTimer, 0x2FC)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bAllowPaste, 0x272)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_sText, 0x248)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bDeleteOnFirstChar, 0x26A)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nLogPosition, 0x2C0)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_fMaxRange, 0x310)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bLog, 0x271)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nEditEnd, 0x2D4)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_fCursorBlinkSpeed, 0x2F8)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, pad_3, 0x301)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nPrecision, 0x318)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, pad_2, 0x274)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_previousNext, 0x273)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_fMinRange, 0x308)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nMaxLength, 0x26C)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nEditBegin, 0x2D0)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, pad, 0x26B)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_nMaxLogSize, 0x2C8)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlEdit, m_bPassword, 0x270)