Untitled Game engine no.5
1.0
|
#include <UI.hpp>
Public Member Functions | |
UIElement (const Ref< Texture > &tex) | |
void | setImage (const Ref< Texture > &tex) |
void | setImage (const Ref< TextureLookup > &lookup) |
void | setSize (float width, float height) |
virtual void | update () |
void | queueVisualUpdate () |
virtual void | updateVisual () |
Public Member Functions inherited from Engine::MeshRenderer | |
void | SetMesh (const Ref< Mesh > &renderMesh) |
void | SetMap (const Ref< Texture > &tex) |
Static Public Member Functions | |
static void | Update (const Scene &scene) |
Public Attributes | |
Ref< VertexCollider2D > | collider = nullptr |
Allignment | origin = CENTER |
collider reference (generated when setting a picture) | |
Public Attributes inherited from Engine::MeshRenderer | |
Ref< ColorMap > | colorMap = nullptr |
Ref< TextureMap > | map = nullptr |
Ref< Texture > | texture = nullptr |
std::vector< Ref< Texture > > | vertexTextures = std::vector<Ref<Texture>>() |
Ref< Mesh > | mesh = nullptr |
Wrapper for a 2D MeshRenderer. Tells the rendering engine to draw the MeshRenderer with an orthographic projection. TODO: extrapolate all sub classes into this one.
Generate a ui element from a Texture.
tex | reference |
|
inline |
Flip the updateVisual flag.
Set the image of the UIElement
tex |
|
inline |
Set the image and mapping data of the UI element.
lookup |
|
inline |
Set the size of the element (useful for alignment and collider calculations)
width | |
height |
|
inlinevirtual |
Syncing function called every game tick
Reimplemented in Engine::UIButton.
|
inlinevirtual |
Update the UI element with new visual data
Reimplemented in Engine::UIButton.