diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-12-27 13:08:36 +0100 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-12-27 13:08:36 +0100 |
| commit | eb6f4d6d8cc6d895c7c6185b20eb93da1fdd8b3b (patch) | |
| tree | 363713e712254d9248866f0176780af301284525 /Source/MapEditor/mygraphicsscene.cpp | |
| parent | 88526570da1d3b8db0db11e232172ab9e8175d8a (diff) | |
| download | airport-eb6f4d6d8cc6d895c7c6185b20eb93da1fdd8b3b.tar.gz | |
* Added "Save map" function to MapEditor.
* Tiles can be now modified runtime.
+ tileset.ini now allows configuring tileset layout in an easy way.
Diffstat (limited to 'Source/MapEditor/mygraphicsscene.cpp')
| -rw-r--r-- | Source/MapEditor/mygraphicsscene.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/MapEditor/mygraphicsscene.cpp b/Source/MapEditor/mygraphicsscene.cpp index 391931e..e108375 100644 --- a/Source/MapEditor/mygraphicsscene.cpp +++ b/Source/MapEditor/mygraphicsscene.cpp @@ -6,15 +6,27 @@ MyGraphicsScene::MyGraphicsScene() } +MyGraphicsScene::~MyGraphicsScene() +{ + +} + void MyGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) { QGraphicsItem *it = this->itemAt(mouseEvent->scenePos(), QTransform()); - if (it != NULL) - { + if (it != NULL) + { + emit positionClicked(mouseEvent->scenePos()); } else { // No items selected + emit noItemSelected(); } } + +void MyGraphicsScene::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *) +{ + emit updateSelectedItem(); +} |
