aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/cpp
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/cpp
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/cpp')
-rw-r--r--src/main/cpp/Widget.cpp8
-rw-r--r--src/main/cpp/WorldScene.cpp2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/cpp/Widget.cpp b/src/main/cpp/Widget.cpp
new file mode 100644
index 0000000..82773bc
--- /dev/null
+++ b/src/main/cpp/Widget.cpp
@@ -0,0 +1,8 @@
+#include "Widget.hpp"
+
+#include <SFML/Graphics.hpp>
+
+void Widget::render()
+{
+ sf::RectangleShape rect;
+}
diff --git a/src/main/cpp/WorldScene.cpp b/src/main/cpp/WorldScene.cpp
index 8887f6f..4b7d940 100644
--- a/src/main/cpp/WorldScene.cpp
+++ b/src/main/cpp/WorldScene.cpp
@@ -16,7 +16,7 @@ void WorldScene::render()
rect.setOutlineThickness(-.5);
rect.setOutlineColor(sf::Color::Black);
- for (const Tile &tile : map.tiles()) {
+ for (const Tile &tile : _map.tiles()) {
rect.setPosition(tile.x * _tileSize, tile.y * _tileSize);
_window.draw(rect);
}