diff --git a/MiniEngine_Widget.h b/MiniEngine_Widget.h index 4a5bc44..d0ee574 100644 --- a/MiniEngine_Widget.h +++ b/MiniEngine_Widget.h @@ -1,6 +1,7 @@ #pragma once #include "MiniEngine.h" #include +#include namespace MiniEngine { @@ -26,16 +27,6 @@ private: friend class Board; }; -class Board -{ -public: - Board(Renderer Rnd,Rect Area); - Brush getBrush(); - Rect getArea(); -private: - Rect area; - Brush brush; -}; class Drawable { @@ -50,6 +41,8 @@ public: virtual int handle(SDL_Event e,int& running,int& update)=0; }; + + class ButtonBase : public Drawable, public Interactive { public: @@ -68,6 +61,29 @@ private: Rect rect; }; +class Board +{ +public: + Board(Renderer Rnd,Rect Area); + Brush getBrush(); + Rect getArea(); + + class _Control + { + public: + void add(Interactive* widget); + Interactive* at(int index); + int size(); + bool remove(Interactive* widget); + private: + std::vector vec; + }Control; + +private: + Rect area; + Brush brush; +}; + }/// End of namespace MiniEngine::Widget }/// End of namespace MiniEngine