UI Border Done
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
#include "dawnlibs.hpp"
|
||||
#include "display/Transform.hpp"
|
||||
#include "scene/SceneItem.hpp"
|
||||
#include "state/State.hpp"
|
||||
#include "state/StateOwner.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class DawnGame;
|
||||
|
@ -84,7 +84,7 @@ void UIBorder::onStart() {
|
||||
4 * QUAD_VERTICE_COUNT, 4 * QUAD_INDICE_COUNT
|
||||
);
|
||||
QuadMesh::bufferQuadMesh(&mesh,
|
||||
glm::vec2(iSize.x + bSize.x, 0), tSize + glm::vec2(tSize.x, 0),
|
||||
glm::vec2(iSize.x + bSize.x, bSize.y), tSize + glm::vec2(tSize.x, 0),
|
||||
glm::vec2(this->getWidth(), bSize.y + iSize.y), glm::vec2(1.0f, tSize.y + tSize.y),
|
||||
5 * QUAD_VERTICE_COUNT, 5 * QUAD_INDICE_COUNT
|
||||
);
|
||||
|
@ -35,9 +35,7 @@ namespace Dawn {
|
||||
|
||||
class UIComponent : public SceneItemComponent, public UIComponentDimensional {
|
||||
protected:
|
||||
// @optional
|
||||
float_t width = 1;
|
||||
// @optional
|
||||
float_t height = 1;
|
||||
|
||||
StateEvent<> eventAlignmentUpdated;
|
||||
@ -77,8 +75,11 @@ namespace Dawn {
|
||||
glm::vec2 alignment
|
||||
);
|
||||
|
||||
StateProperty<UIComponentAlign> alignX;
|
||||
StateProperty<UIComponentAlign> alignY;
|
||||
// @optional
|
||||
StateProperty<enum UIComponentAlign> alignX;
|
||||
// @optional
|
||||
StateProperty<enum UIComponentAlign> alignY;
|
||||
// @optional
|
||||
StateProperty<glm::vec4> alignment;
|
||||
|
||||
UIComponent(SceneItem *item);
|
||||
|
Reference in New Issue
Block a user