Bubba-3D
0.9.0
Awesome game engine!
|
Classes | |
struct | PositionedLayout |
Public Member Functions | |
virtual void | addChild (Layout *child) |
virtual void | addChild (Layout *child, Dimension x, Dimension y) |
virtual Dimension | getWidth () |
virtual Dimension | getHeight () |
virtual void | getGLSquares (float layoutXPos, float layoutYPos, float layoutWidth, float layoutHeight, std::map< std::string, IHudDrawable * > *map) |
PositioningLayout (Dimension width, Dimension height) | |
void | checkChildCompatibility (Layout *child) |
virtual Layout * | findById (std::string id) |
virtual void | invokeListenersInternal (int x, int y, ListenerType listenerType, bool mayBeHit) |
![]() | |
virtual std::map< std::string, IHudDrawable * > | getGLSquares (float layoutXPos, float layoutYPos, float layoutWidth, float layoutHeight) |
virtual HUDGraphic * | getGraphic () |
virtual Layout * | setBackground (HUDGraphic *graphic) |
virtual Layout * | setLayoutId (std::string id) |
Protected Attributes | |
Dimension | width |
Dimension | height |
std::vector< PositionedLayout * > | children |
Additional Inherited Members | |
![]() | |
enum | ListenerType { ON_CLICK_LISTENER, ON_HOVER_LISTENER } |
typedef std::function< void(int x, int y, Layout *element, bool enteredElseLeaving)> | EventFunction |
Definition at line 21 of file PositioningLayout.h.
|
virtual |
The function to fetch all GLSquares from this layout and its children based on the position and dimensions given. The parent calculates the dimensions and implementing classes must assume that the dimensions are correct. The parent uses getWidth() and getHeight() to determine the dimensions.
The overridden method should always call Layout::getGLSquares(float layoutXPos, float layoutYPos, float layoutWidth, float layoutHeight, map<string,IHudDrawable*>* list) before doing anything else. Otherwise Layout::setBackground() won't have an effect.
Implements Layout.
Definition at line 53 of file PositioningLayout.cpp.
|
virtual |
Implements Layout.
Definition at line 44 of file PositioningLayout.cpp.
|
virtual |
Implements Layout.
Definition at line 40 of file PositioningLayout.cpp.