7#include "WindowFlags.h"
8#include "WindowStyle.h"
9#include <Cyrus/Classes/PropertyClass.h>
10#include <Cyrus/shared.h>
23typedef int64_t (*ClickResponder_t)(
Window *element);
28 std::list<ClickResponder_t> clickResponders;
31 std::list<ClickResponder_t>
getList() {
return clickResponders; }
50 std::vector<std::shared_ptr<Window>> children;
63 float m_fDisabledAlpha;
69 int64_t m_pWindowStyle;
70 void *soundDescriptor;
73 std::string m_sScript;
80 char **internalClassName;
114 CYRUS std::vector<std::shared_ptr<Window>>
getChildren();
140 CYRUS
void addFlag(uint32_t flag);
151 CYRUS
void addStyle(uint32_t style);
273 CYRUS
void setScale(
float x,
float y);
304 template <
class T> CYRUS T *
findChild(
const std::string &name) {
305 for (
auto &child : children) {
306 if (child->getName() == name) {
307 return child->as<T>();
329 for (
auto &child : children) {
330 if (child->getName() == name) {
331 return child->as<T>();
333 T *descendant = child->findDescendant<T>(name);
334 if (descendant !=
nullptr) {
383STATIC_ASSERT(
sizeof(
Window) == 0x248,
"Window size is not correct");
A class that represents an editable text control element in a window.
Definition ControlEdit.h:21
std::list< ClickResponder_t > getList()
Definition Window.h:31
Base class for all property classes, providing reflection and serialization functionality.
Definition PropertyClass.h:86
Represents a Wizard101 Window, think anything you see on screen that is not a 3D model.
Definition Window.h:45
CYRUS Rect * getTransform()
Get the transformation coordinates of the window.
Definition Window.cpp:119
CYRUS Window * getParent()
Get the Windows parent Window.
Definition Window.cpp:15
CYRUS std::vector< std::shared_ptr< Window > > getChildren()
Retrieve the child Windows of this Window.
Definition Window.cpp:13
virtual bool updateDockPosition()
CYRUS float getTargetAlpha() const
Get the target alpha value of the window.
Definition Window.cpp:135
CYRUS std::string getFlags()
Definition Window.cpp:17
CYRUS VectorI2D getParentOffset() const
Get the offset of the window relative to its parent.
Definition Window.cpp:123
CYRUS float getDisabledAlpha() const
Get the alpha value when the window is disabled.
Definition Window.cpp:129
CYRUS void setTransform(Rect in)
Sets the transformation coordinates of the window.
Definition Window.cpp:121
CYRUS void addStyle(uint32_t style)
Unconditionally sets the specified Window style to 1.
Definition Window.cpp:109
CYRUS void setFTargetAlpha(float fTargetAlpha)
Set the target alpha value of the window.
Definition Window.cpp:137
CYRUS std::string getName()
Retrieve the name of the Window.
Definition Window.cpp:11
CYRUS void performScale(float factor)
Scales the current Window, and all descendants, by the scale factor. If the scale factor is 2,...
Definition Window.cpp:147
CYRUS void setFDisabledAlpha(float fDisabledAlpha)
Set the alpha value for when the window is disabled.
Definition Window.cpp:131
CYRUS float getTimeOnScreen() const
Get the total time the window has been displayed on the screen.
Definition Window.cpp:125
CYRUS void removeFlag(uint32_t flag)
Unconditionally sets the specified Window flag to 0.
Definition Window.cpp:115
CYRUS std::list< ClickResponder_t > getClickResponders()
Definition Window.cpp:5
CYRUS void toggleFlag(uint32_t flag)
Toggles the current value of the specified Window flag.
Definition Window.cpp:111
CYRUS void setTimeOnScreen(float screenTime)
Set the total time the window has been displayed on the screen.
Definition Window.cpp:127
CYRUS T * findDescendant(const std::string &name)
Find a descendant Window by name and cast it to the specified type.
Definition Window.h:328
CYRUS void setScale(float x, float y)
Sets the scale of the window.
Definition Window.cpp:143
CYRUS void removeStyle(uint32_t style)
Unconditionally sets the specified Window style to 0.
Definition Window.cpp:117
CYRUS VectorI2D getOffset() const
Get the offset of the window.
Definition Window.cpp:145
CYRUS int32_t getWindowID() const
Retrieve the unique identifier for the Window.
Definition Window.cpp:3
CYRUS void toggleStyle(uint32_t style)
Toggles the current value of the specified Window style.
Definition Window.cpp:113
CYRUS T * findChild(const std::string &name)
Find a child Window by name and cast it to the specified type.
Definition Window.h:304
CYRUS void addFlag(uint32_t flag)
Unconditionally sets the specified Window flag to 1.
Definition Window.cpp:107
CYRUS std::string getStyles()
Definition Window.cpp:57
CYRUS Vector2D getScale() const
Get the scale of the window.
Definition Window.cpp:141
Definition WindowFlags.h:5
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, N00000417, 0xD0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, screen_time, 0xE0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_Flags, 0x9C)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_Style, 0x98)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, artDescriptor, 0x1C0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, N000008E4, 0xDC)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, pad_01C8, 0x1C8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, pad_00B8, 0xB8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, inputHandler, 0x90)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, transform, 0xA0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, N00000A81, 0x48)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, parent, 0x88)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, soundDescriptor, 0xF0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, parentOffset, 0xB0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_pWindowStyle, 0xE8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, pad_01B0, 0x1B0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_BubbleList, 0x1A8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, screen_time_, 0xE4)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_sScript, 0x160)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_sHelp, 0xF8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, children, 0x70)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_fTargetAlpha, 0xD4)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_fDisabledAlpha, 0xD8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_sTip, 0x188)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, scale, 0xC8)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, m_sName, 0x50)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, internalClassName, 0x240)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, pad_0118, 0x118)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, offset, 0xC0)
DEFINE_OFFSET_AND_STATIC_ASSERT(Window, windowID, 0x4C)
Definition WindowStyle.h:5