31 #ifndef CRAB_ELEMENT_H 32 #define CRAB_ELEMENT_H 34 #include "crab/image/ImageManager.h" 35 #include "crab/Rectangle.h" 36 #include "crab/vectors.h" 40 namespace pyrodactyl {
51 void basicload(rapidxml::xml_node<char> *node,
const bool &echo =
true);
55 _align.x = ALIGN_LEFT;
56 _align.y = ALIGN_LEFT;
61 void init(
const int &x,
const int &y,
const Align &alignX,
const Align &alignY,
62 const ImageKey image = 0,
const int &w = 0,
const int &h = 0);
65 void init(
const Element &e, ImageKey img = 0,
const int &xOffset = 0,
const int &yOffset = 0) {
66 _raw.x = e._raw.x + xOffset;
67 _raw.y = e._raw.y + yOffset;
68 init(e.x + xOffset, e.y + yOffset, e._align.x, e._align.y, img, e.w, e.h);
72 void load(rapidxml::xml_node<char> *node, ImageKey img,
const bool &echo =
true);
75 void load(rapidxml::xml_node<char> *node,
Rect *parent =
nullptr,
const bool &echo =
true);
77 void setUI(
Rect *parent =
nullptr);
84 #endif // CRAB_ELEMENT_H Definition: Rectangle.h:42
Definition: moveeffect.h:37