aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/headers/Widget.hpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-16 21:10:24 +0100
committerNao Pross <naopross@thearcway.org>2018-02-16 21:10:24 +0100
commit1010d0d526ad7419449f19ac4db42d63f7731540 (patch)
treee037bc5f4f30ffc5324cccc9a3b018f7937c2bab /src/main/headers/Widget.hpp
parentAdd RangedWeapon, MeleeWeapon (diff)
downloadSubconscious-old-1010d0d526ad7419449f19ac4db42d63f7731540.tar.gz
Subconscious-old-1010d0d526ad7419449f19ac4db42d63f7731540.zip
Add basic widget implementation (not usable) and configure cmake
Diffstat (limited to 'src/main/headers/Widget.hpp')
-rw-r--r--src/main/headers/Widget.hpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/headers/Widget.hpp b/src/main/headers/Widget.hpp
new file mode 100644
index 0000000..53543fc
--- /dev/null
+++ b/src/main/headers/Widget.hpp
@@ -0,0 +1,23 @@
+#ifndef WIDGET_HPP
+#define WIDGET_HPP
+
+#include <SFML/Graphics.hpp>
+
+struct Widget
+{
+public:
+ int x;
+ int y;
+ unsigned width;
+ unsigned height;
+
+ Widget() = delete;
+ virtual void render();
+
+protected:
+ sf::RenderWindow &_window;
+
+ Widget(sf::RenderWindow &window) : _window(window) {}
+};
+
+#endif