diff --git a/pui/container.h b/pui/container.h index 6d58078..a9cf365 100644 --- a/pui/container.h +++ b/pui/container.h @@ -28,6 +28,8 @@ public: int back; int padding; + Container() : back(0), padding(0) {} + ~Container(); /* virtual */ Widget *GetWidget(int x, int y); diff --git a/pui/pui.h b/pui/pui.h index 9be2948..676fb55 100644 --- a/pui/pui.h +++ b/pui/pui.h @@ -35,6 +35,8 @@ struct PUi : PTextures { int mx, my, mb, mm; float scale; + PUi() : view(NULL), widget(NULL), tooltip(NULL), active(NULL), mx(0), my(0), mb(0), mm(0), scale(1.f) {} + virtual ~PUi(); inline void Repaint() { puglPostRedisplay(this->view); } diff --git a/pui/textures.h b/pui/textures.h index 50ed873..20c8a60 100644 --- a/pui/textures.h +++ b/pui/textures.h @@ -40,6 +40,8 @@ struct PTextures { FTFont *font; + PTextures() : initialised(false) {} + void InitTextures(); void BindTexture(int texture, int width, int height, const unsigned char *data, int format = GL_RGBA); }; diff --git a/pui/widget.h b/pui/widget.h index d03a460..170b3a2 100644 --- a/pui/widget.h +++ b/pui/widget.h @@ -25,6 +25,8 @@ struct Rect { int w; int h; + Rect() : x(0), y(0), w(0), h(0) {} + inline bool Hit(int hitx, int hity) { return hitx >= x && hitx < x + w && hity >= y && hity < y + h; @@ -34,7 +36,7 @@ struct Rect { struct Colour { float r, g, b, a; - Colour() {} + Colour() : r(0), g(0), b(0), a(0) {} Colour(float r, float g, float b) : r(r), g(g), b(b), a(1.f) {} Colour(float r, float g, float b, float a) : r(r), g(g), b(b), a(a) {} }; @@ -53,7 +55,7 @@ struct Widget : Rect { bool active; - Widget() : port(UINT_MAX) {} + Widget() : port(UINT_MAX), min(0.f), max(1.f), value(0.f), active(false) {} virtual ~Widget() {}