Browse Source

remove rgab (in favor of unsigned int), win is now a property

master
Odilitime 5 years ago
parent
commit
ca10ce7d05
  1. 15
      src/graphics/components/Component.h

15
src/graphics/components/Component.h

@ -6,19 +6,15 @@ @@ -6,19 +6,15 @@
#include <vector>
#include <string>
#include <GL/glew.h>
//#include "../opengl/Window.h"
class Window;
const unsigned int indices[6] = {
0, 1, 2,
0, 2, 3
};
struct rgba {
unsigned int r;
unsigned int g;
unsigned int b;
unsigned int a;
};
struct UImetric {
double lengthPct = 0;
int offset = 0;
@ -58,6 +54,7 @@ struct UILayoutV2 { @@ -58,6 +54,7 @@ struct UILayoutV2 {
// and renderable component
class Component {
public:
// constructing with a window would make a lot of sense (textcomponent can't rasterize until we have the max texture size)
virtual ~Component();
// we're currently constructed with a pos
// so recalculating it is only good for resize
@ -109,6 +106,8 @@ public: @@ -109,6 +106,8 @@ public:
// how are these used?
int windowWidth;
int windowHeight;
// handle to signal that a redraw is needed, and access to shader programs
std::shared_ptr<Window> win;
bool boundToPage = true;
bool useBoxShader = true;
bool verticesDirty = false;
@ -155,7 +154,7 @@ public: @@ -155,7 +154,7 @@ public:
//
UIlayout uiControl;
// color
rgba color;
unsigned int color;
bool isVisibile = true;
bool isInline = false; // text-only thing but there maybe other non-text inline
bool isPickable = true;

Loading…
Cancel
Save