From 4eaa6c091f97ca3455b2ae48a5f68867c0f7768e Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Tue, 26 Dec 2017 22:18:37 +0100 Subject: * Slight optimization: all comparations against true are now compared against != false. + Added a provisional background during gameplay (still WIP). * Map editor now allows creating a map. --- Source/MapEditor/mygraphicsscene.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Source/MapEditor/mygraphicsscene.cpp (limited to 'Source/MapEditor/mygraphicsscene.cpp') diff --git a/Source/MapEditor/mygraphicsscene.cpp b/Source/MapEditor/mygraphicsscene.cpp new file mode 100644 index 0000000..391931e --- /dev/null +++ b/Source/MapEditor/mygraphicsscene.cpp @@ -0,0 +1,20 @@ +#include "mygraphicsscene.h" +#include + +MyGraphicsScene::MyGraphicsScene() +{ + +} + +void MyGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) +{ + QGraphicsItem *it = this->itemAt(mouseEvent->scenePos(), QTransform()); + if (it != NULL) + { + + } + else + { + // No items selected + } +} -- cgit v1.2.3