Cyrus Mod Loader
|
Represents a Wizard101 Window, think anything you see on screen that is not a 3D model. More...
#include <Window.h>
Public Member Functions | |
CYRUS int32_t | getWindowID () const |
Retrieve the unique identifier for the Window. | |
CYRUS std::list< ClickResponder_t > | getClickResponders () |
CYRUS std::string | getName () |
Retrieve the name of the Window. | |
CYRUS std::vector< std::shared_ptr< Window > > | getChildren () |
Retrieve the child Windows of this Window. | |
CYRUS Window * | getParent () |
Get the Windows parent Window. | |
CYRUS std::string | getFlags () |
CYRUS std::string | getStyles () |
CYRUS void | addFlag (uint32_t flag) |
Unconditionally sets the specified Window flag to 1. | |
CYRUS void | addStyle (uint32_t style) |
Unconditionally sets the specified Window style to 1. | |
CYRUS void | toggleFlag (uint32_t flag) |
Toggles the current value of the specified Window flag. | |
CYRUS void | toggleStyle (uint32_t style) |
Toggles the current value of the specified Window style. | |
CYRUS void | removeFlag (uint32_t flag) |
Unconditionally sets the specified Window flag to 0. | |
CYRUS void | removeStyle (uint32_t style) |
Unconditionally sets the specified Window style to 0. | |
CYRUS Rect * | getTransform () |
Get the transformation coordinates of the window. | |
CYRUS void | setTransform (Rect in) |
Sets the transformation coordinates of the window. | |
CYRUS VectorI2D | getParentOffset () const |
Get the offset of the window relative to its parent. | |
CYRUS float | getTimeOnScreen () const |
Get the total time the window has been displayed on the screen. | |
CYRUS void | setTimeOnScreen (float screenTime) |
Set the total time the window has been displayed on the screen. | |
CYRUS float | getDisabledAlpha () const |
Get the alpha value when the window is disabled. | |
CYRUS void | setFDisabledAlpha (float fDisabledAlpha) |
Set the alpha value for when the window is disabled. | |
CYRUS float | getTargetAlpha () const |
Get the target alpha value of the window. | |
CYRUS void | setFTargetAlpha (float fTargetAlpha) |
Set the target alpha value of the window. | |
CYRUS Vector2D | getScale () const |
Get the scale of the window. | |
CYRUS void | setScale (float x, float y) |
Sets the scale of the window. | |
CYRUS VectorI2D | getOffset () const |
Get the offset of the window. | |
CYRUS void | performScale (float factor) |
Scales the current Window, and all descendants, by the scale factor. If the scale factor is 2, the Window and it's descendants will be twice as large. If the scale factor is 0.5, the Window and it's descendants will be twice as small. | |
template<class T > | |
CYRUS T * | findChild (const std::string &name) |
Find a child Window by name and cast it to the specified type. | |
template<class T > | |
CYRUS T * | findDescendant (const std::string &name) |
Find a descendant Window by name and cast it to the specified type. | |
virtual void | func1 () |
virtual void | func2 () |
virtual void | func3 () |
virtual void | func4 () |
virtual void | func5 () |
virtual void | func6 () |
virtual void | func7 () |
virtual void | func8 () |
virtual void | func9 () |
virtual void | func10 () |
virtual void | func11 () |
virtual void | func12 () |
virtual void | func13 () |
virtual void | func14 () |
virtual void | func15 () |
virtual void | func16 () |
virtual void | func17 () |
virtual void | func18 () |
virtual void | func19 () |
virtual void | func20 () |
virtual void | func21 () |
virtual void | func22 () |
virtual void | func23 () |
virtual void | func24 () |
virtual void | func25 () |
virtual void | func26 () |
virtual void | func27 () |
virtual void | func28 () |
virtual void | func29 () |
virtual void | func30 () |
virtual void | func31 () |
virtual void | func32 () |
virtual void | func33 () |
virtual void | func34 () |
virtual void | func35 () |
virtual bool | updateDockPosition () |
![]() | |
virtual char * | getClassName ()=0 |
Gets the class name of the derived class in the format class T[*] . | |
virtual void * | getPropertyList ()=0 |
Constructs and caches the PropertyList for the derived class, adding all reflected members and member functions. | |
virtual bool | copy (uint32_t a1)=0 |
Copies the property class data. | |
virtual void * | serialize (void *a2, uint32_t a3)=0 |
Serializes the derived class's PropertyList as XML. | |
virtual bool | onCreated ()=0 |
Called when the PropertyClass is created. | |
template<typename T > | |
CYRUS T * | as () |
Casts this to a pointer of type T. | |
virtual void | onPostLoad ()=0 |
Called when the PropertyClass is loaded, i.e., initialize is called and onCreated has finished. | |
virtual void | onFinalizeLoad ()=0 |
virtual bool | shouldNotSerialize ()=0 |
Determines if the PropertyClass should not be serialized. | |
Friends | |
struct | WindowLayout |
Represents a Wizard101 Window, think anything you see on screen that is not a 3D model.
This class inherits from PropertyClass and provides functionality for managing windows. It contains various member variables and member functions for manipulating the window properties.
void Window::addFlag | ( | uint32_t | flag | ) |
Unconditionally sets the specified Window flag to 1.
This function sets the specified flag in the internal flags variable to 1. It performs a bitwise OR operation to ensure the flag is set without affecting other flags.
flag | The flag to be set. |
void Window::addStyle | ( | uint32_t | style | ) |
Unconditionally sets the specified Window style to 1.
This function sets the specified style in the internal style variable to 1. It performs a bitwise OR operation to ensure the style is set without affecting other styles.
style | The style to be set. |
|
inline |
Find a child Window by name and cast it to the specified type.
This function searches through the immediate children of the current Window to find a child with the specified name. If a matching child is found, it is cast to the specified type T
and returned. If no matching child is found, the function returns nullptr
.
T | The type to which the found child should be cast. |
name | The name of the child Window to find. |
T
, or nullptr
if no matching child is found.
|
inline |
Find a descendant Window by name and cast it to the specified type.
This function searches through the immediate children and all their descendants of the current Window to find a descendant with the specified name. If a matching descendant is found, it is cast to the specified type T
and returned. If no matching descendant is found, the function returns nullptr
.
T | The type to which the found descendant should be cast. |
name | The name of the descendant Window to find. |
T
, or nullptr
if no matching descendant is found.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
std::vector< std::shared_ptr< Window > > Window::getChildren | ( | ) |
Retrieve the child Windows of this Window.
This function returns a vector of shared pointers to the children of this Window. Each child is also a Window object. This allows you to access and manipulate the hierarchical structure of Windows.
std::list< ClickResponder_t > Window::getClickResponders | ( | ) |
float Window::getDisabledAlpha | ( | ) | const |
Get the alpha value when the window is disabled.
std::string Window::getFlags | ( | ) |
std::string Window::getName | ( | ) |
VectorI2D Window::getOffset | ( | ) | const |
Get the offset of the window.
Window * Window::getParent | ( | ) |
VectorI2D Window::getParentOffset | ( | ) | const |
Get the offset of the window relative to its parent.
Vector2D Window::getScale | ( | ) | const |
Get the scale of the window.
std::string Window::getStyles | ( | ) |
float Window::getTargetAlpha | ( | ) | const |
Get the target alpha value of the window.
float Window::getTimeOnScreen | ( | ) | const |
Get the total time the window has been displayed on the screen.
Rect * Window::getTransform | ( | ) |
Get the transformation coordinates of the window.
int32_t Window::getWindowID | ( | ) | const |
void Window::performScale | ( | float | factor | ) |
void Window::removeFlag | ( | uint32_t | flag | ) |
Unconditionally sets the specified Window flag to 0.
This function clears the specified flag in the internal flags variable by setting it to 0. It performs a bitwise AND operation with the complement of the flag to ensure the flag is cleared without affecting other flags.
flag | The flag to be cleared. |
void Window::removeStyle | ( | uint32_t | style | ) |
Unconditionally sets the specified Window style to 0.
This function clears the specified style in the internal style variable by setting it to 0. It performs a bitwise AND operation with the complement of the style to ensure the style is cleared without affecting other styles.
style | The style to be cleared. |
void Window::setFDisabledAlpha | ( | float | fDisabledAlpha | ) |
Set the alpha value for when the window is disabled.
fDisabledAlpha | The alpha value. |
void Window::setFTargetAlpha | ( | float | fTargetAlpha | ) |
Set the target alpha value of the window.
fTargetAlpha | The target alpha value. |
void Window::setScale | ( | float | x, |
float | y ) |
Sets the scale of the window.
x | The horizontal scaling factor |
y | The vertical scaling factor |
void Window::setTimeOnScreen | ( | float | screenTime | ) |
Set the total time the window has been displayed on the screen.
screenTime | The time in seconds. |
void Window::setTransform | ( | Rect | in | ) |
Sets the transformation coordinates of the window.
void Window::toggleFlag | ( | uint32_t | flag | ) |
Toggles the current value of the specified Window flag.
This function flips the current value of the specified flag in the internal flags variable. If the flag is currently set to 1, it will be changed to 0, and if it is currently set to 0, it will be changed to 1.
flag | The flag to be toggled. |
void Window::toggleStyle | ( | uint32_t | style | ) |
Toggles the current value of the specified Window style.
This function flips the current value of the specified style in the internal style variable. If the style is currently set to 1, it will be changed to 0, and if it is currently set to 0, it will be changed to 1.
style | The style to be toggled. |
|
virtual |
|
friend |