3#include "InputEvents.hpp"
4#include "colorspaces.hpp"
5#include "DrawUtils.hpp"
6#include "Animation.hpp"
12#define DEEP_HIGHLIGHT 200
13#define THICK_HIGHLIGHT 150
18#define RAMFS "resin:/"
23#if defined(_3DS) || defined(_3DS_MOCK)
25#elif defined(WII) || defined(WII_MOCK)
51 void hide() { this->
hidden =
true; }
53 void unhide() { this->
hidden =
false; }
56 void renderBackground(
bool fill =
true);
61 std::function<void(
InputEvents* event)> actionWithEvents = NULL;
68 void removeAll(
bool moveToTrash =
false);
95 bool hasBackground =
false;
98 rgb backgroundColor = {0, 0, 0};
101 int backgroundOpacity = 0xff;
104 bool isAbsolute =
false;
113 CST_Rect getBounds();
116 bool isProtected =
false;
131 int xAbs = 0, yAbs = 0;
136 int xOff = 0, yOff = 0;
139 int cornerRadius = 0;
142 CST_Renderer* getRenderer();
148 void wipeAll(
bool delSelf =
false);
152 Element* setPosition(
int x,
int y);
153 Element* setAction(std::function<
void()> func);
159 Element* setAbsolute(
bool isAbs);
162 std::vector<Constraint*> constraints;
163 Element* constrain(
int flags,
int padding = 0);
166 std::vector<Animation*> animations;
169 std::function<
void(
float)> onStep,
170 std::function<
void()> onFinish
virtual bool process(InputEvents *event)
process any input that is received for this element
bool hidden
whether this element should skip rendering or not
bool dragging
whether or not this element is currently being dragged
bool touchable
whether or not this element can be touched (highlights bounds)
void screenshot(std::string path)
Take a screenshot of this element and its children, and save it to the given path.
std::function< void()> action
the action to call (from binded callback) on touch or button selection https://stackoverflow....
int futureRedrawCounter
whether this element needs a redraw for the next X redraws (decreases each time) (0 is no redraws)
int elasticCounter
how much time is left in an elastic-type flick/scroll set by the last distance traveled in a scroll,...
virtual void render(Element *parent)
display the current state of the display
bool useColorMask
whether or not to overlay a color mask on top of this element
int lastMouseY
the last Y, X coordinate of the mouse (from a drag probably)
void position(int x, int y)
position the element
double angle
rotation angle in degrees
bool needsRedraw
whether or not this element needs the screen redrawn next time it's processed
CST_Color maskColor
The color to overlay on top.
int width
width and height of this element (must be manually set, isn't usually calculated (but is in some case...
Element * parent
the parent element (can sometimes be null if it isn't set)
std::vector< Element * > elements
visible GUI child elements of this element