Cyrus Mod Loader
Loading...
Searching...
No Matches
ControlButton.h
1#pragma once
2#include <Cyrus/Classes/Window.h>
3#include <Cyrus/shared.h>
4
6
7#pragma pack(push, 1)
22class ControlButton : public Window {
23private:
24 uint8_t pad[0x18]; // 0x248
25 bool m_bToggle; // 0x260
26 bool m_bButtonDown; // 0x261
27 uint8_t pad_1[0x6]; // 0x262
28 std::wstring m_sLabel; // 0x268
29 uintptr_t pad_2; // 0x288
30 uint8_t m_pButton[0x10]; // 0x290
31 unsigned int m_HotKey; // 0x2A0
32 int color; // 0x2A4
33 bool m_bHotKeyDown; // 0x2A8
34 uint8_t pad_3[0x3]; // 0x2A9
35 float m_fTime; // 0x2AC
36 bool m_bGreyed; // 0x2B0
37 bool m_bCursorOver; // 0x2B1
38 uint8_t pad_4[0x2]; // 0x2B2
39 float m_fMaxScale; // 0x2B4
40 float m_fScaleSpeed; // 0x2B8
41 uint32_t pad_a; // 0x2BC
42 bool m_bUseDropShadow; // 0x2C0
43 bool m_bUseOutline; // 0x2C1
44 bool m_bAbortWhenCursorNotOver; // 0x2C2
45
46public:
52 CYRUS bool isToggle() const;
53
59 CYRUS void setToggle(bool toggle);
60
66 CYRUS bool isButtonDown() const;
67
73 CYRUS void setButtonDown(bool buttonDown);
74
80 CYRUS std::wstring getLabel() const;
81
87 CYRUS void setLabel(const std::wstring &label);
88
94 CYRUS unsigned int getHotKey() const;
95
101 CYRUS void setHotKey(unsigned int hotKey);
102
108 CYRUS int getColor() const;
109
115 CYRUS void setColor(int col);
116
122 CYRUS bool isHotKeyDown() const;
123
129 CYRUS void setHotKeyDown(bool hotKeyDown);
130
136 CYRUS float getTime() const;
137
143 CYRUS void setTime(float time);
144
150 CYRUS bool isGreyed() const;
151
157 CYRUS void setGreyed(bool greyed);
158
164 CYRUS bool isCursorOver() const;
165
172 CYRUS void setCursorOver(bool cursorOver);
173
179 CYRUS float getMaxScale() const;
180
186 CYRUS void setMaxScale(float maxScale);
187
193 CYRUS float getScaleSpeed() const;
194
200 CYRUS void setScaleSpeed(float scaleSpeed);
201
207 CYRUS bool isDropShadowUsed() const;
208
214 CYRUS void setDropShadowUsed(bool useDropShadow);
215
221 CYRUS bool isOutlineUsed() const;
222
228 CYRUS void setOutlineUsed(bool useOutline);
229
237 CYRUS bool isAbortWhenCursorNotOver() const;
238
246 CYRUS void setAbortWhenCursorNotOver(bool abortWhenCursorNotOver);
247
248private:
249 friend struct ControlButtonLayout;
250};
251#pragma pack(pop)
252
A class that represents a button control element in a window.
Definition ControlButton.h:22
CYRUS float getScaleSpeed() const
Get the scale speed of the button.
Definition ControlButton.cpp:49
CYRUS void setDropShadowUsed(bool useDropShadow)
Enable or disable drop shadow.
Definition ControlButton.cpp:57
CYRUS void setTime(float time)
Set the time associated with the button.
Definition ControlButton.cpp:33
CYRUS void setButtonDown(bool buttonDown)
Set the button down state.
Definition ControlButton.cpp:9
CYRUS void setHotKeyDown(bool hotKeyDown)
Set the hotkey down state.
Definition ControlButton.cpp:27
CYRUS void setGreyed(bool greyed)
Set the greyed out state of the button.
Definition ControlButton.cpp:37
CYRUS bool isOutlineUsed() const
Check if outline is used.
Definition ControlButton.cpp:61
CYRUS void setOutlineUsed(bool useOutline)
Enable or disable outline.
Definition ControlButton.cpp:63
CYRUS bool isDropShadowUsed() const
Check if drop shadow is used.
Definition ControlButton.cpp:55
CYRUS bool isButtonDown() const
Check if the button is currently pressed down.
Definition ControlButton.cpp:7
CYRUS bool isGreyed() const
Check if the button is greyed out.
Definition ControlButton.cpp:35
CYRUS void setCursorOver(bool cursorOver)
Set the cursor over state of the button.
Definition ControlButton.cpp:41
CYRUS void setMaxScale(float maxScale)
Set the maximum scale of the button.
Definition ControlButton.cpp:47
CYRUS int getColor() const
Get the color of the button.
Definition ControlButton.cpp:21
CYRUS float getTime() const
Get the time associated with the button.
Definition ControlButton.cpp:31
CYRUS void setHotKey(unsigned int hotKey)
Set the hotkey for the button.
Definition ControlButton.cpp:19
CYRUS unsigned int getHotKey() const
Get the hotkey assigned to the button.
Definition ControlButton.cpp:17
CYRUS bool isToggle() const
Check if the button is in toggle state.
Definition ControlButton.cpp:3
CYRUS void setColor(int col)
Set the color of the button.
Definition ControlButton.cpp:23
CYRUS bool isCursorOver() const
Check if the cursor is over the button.
Definition ControlButton.cpp:39
CYRUS void setToggle(bool toggle)
Set the toggle state of the button.
Definition ControlButton.cpp:5
CYRUS void setLabel(const std::wstring &label)
Set the label of the button.
Definition ControlButton.cpp:15
CYRUS void setScaleSpeed(float scaleSpeed)
Set the scale speed of the button.
Definition ControlButton.cpp:51
CYRUS void setAbortWhenCursorNotOver(bool abortWhenCursorNotOver)
Enable or disable aborting actions when the cursor is not over the button.
Definition ControlButton.cpp:71
CYRUS bool isAbortWhenCursorNotOver() const
Check if actions should be aborted when the cursor is not over the button.
Definition ControlButton.cpp:67
CYRUS std::wstring getLabel() const
Get the label of the button.
Definition ControlButton.cpp:13
CYRUS float getMaxScale() const
Get the maximum scale of the button.
Definition ControlButton.cpp:45
CYRUS bool isHotKeyDown() const
Check if the hotkey is currently pressed down.
Definition ControlButton.cpp:25
Represents a Wizard101 Window, think anything you see on screen that is not a 3D model.
Definition Window.h:45
Definition ControlButton.h:253
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, color, 0x2A4)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bUseDropShadow, 0x2C0)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bGreyed, 0x2B0)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bButtonDown, 0x261)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bToggle, 0x260)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_HotKey, 0x2A0)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, pad_1, 0x262)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, pad_4, 0x2B2)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, pad, 0x248)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_pButton, 0x290)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_fTime, 0x2AC)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bCursorOver, 0x2B1)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bAbortWhenCursorNotOver, 0x2C2)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_sLabel, 0x268)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bUseOutline, 0x2C1)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_fMaxScale, 0x2B4)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_fScaleSpeed, 0x2B8)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, m_bHotKeyDown, 0x2A8)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, pad_3, 0x2A9)
DEFINE_OFFSET_AND_STATIC_ASSERT(ControlButton, pad_2, 0x288)