|
@@ -266,10 +266,24 @@ protected:
|
266
|
266
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
|
267
|
267
|
};
|
268
|
268
|
|
269
|
|
-class CollisionMetatilesPixmapItem : public MetatilesPixmapItem {
|
|
269
|
+class MovementPermissionsPixmapItem : public MetatilesPixmapItem {
|
270
|
270
|
Q_OBJECT
|
271
|
271
|
public:
|
272
|
|
- CollisionMetatilesPixmapItem(Map *map_): MetatilesPixmapItem(map_) {
|
|
272
|
+ MovementPermissionsPixmapItem(Map *map_): MetatilesPixmapItem(map_) {}
|
|
273
|
+ virtual void pick(uint collision) {
|
|
274
|
+ map->paint_collision = collision;
|
|
275
|
+ draw();
|
|
276
|
+ }
|
|
277
|
+protected:
|
|
278
|
+ void mousePressEvent(QGraphicsSceneMouseEvent*);
|
|
279
|
+ void mouseMoveEvent(QGraphicsSceneMouseEvent*);
|
|
280
|
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
|
|
281
|
+};
|
|
282
|
+
|
|
283
|
+class CollisionMetatilesPixmapItem : public MovementPermissionsPixmapItem {
|
|
284
|
+ Q_OBJECT
|
|
285
|
+public:
|
|
286
|
+ CollisionMetatilesPixmapItem(Map *map_): MovementPermissionsPixmapItem(map_) {
|
273
|
287
|
connect(map, SIGNAL(paintCollisionChanged(Map*)), this, SLOT(paintCollisionChanged(Map *)));
|
274
|
288
|
}
|
275
|
289
|
virtual void pick(uint collision) {
|
|
@@ -287,10 +301,10 @@ private slots:
|
287
|
301
|
}
|
288
|
302
|
};
|
289
|
303
|
|
290
|
|
-class ElevationMetatilesPixmapItem : public MetatilesPixmapItem {
|
|
304
|
+class ElevationMetatilesPixmapItem : public MovementPermissionsPixmapItem {
|
291
|
305
|
Q_OBJECT
|
292
|
306
|
public:
|
293
|
|
- ElevationMetatilesPixmapItem(Map *map_): MetatilesPixmapItem(map_) {
|
|
307
|
+ ElevationMetatilesPixmapItem(Map *map_): MovementPermissionsPixmapItem(map_) {
|
294
|
308
|
connect(map, SIGNAL(paintCollisionChanged(Map*)), this, SLOT(paintCollisionChanged(Map *)));
|
295
|
309
|
}
|
296
|
310
|
virtual void pick(uint elevation) {
|