extend most toolbuttons for use in event editing

This commit is contained in:
garak
2019-11-02 14:40:43 -04:00
committed by garakmon
parent bf58549666
commit b5adbe782d
5 changed files with 123 additions and 64 deletions

View File

@@ -13,14 +13,19 @@ private:
using QGraphicsPixmapItem::paint;
public:
enum class PaintMode {
Disabled,
Metatiles,
EventObjects
};
MapPixmapItem(Map *map_, MetatileSelector *metatileSelector, Settings *settings) {
this->map = map_;
this->metatileSelector = metatileSelector;
this->settings = settings;
this->paintingEnabled = true;
this->paintingMode = PaintMode::Metatiles;
setAcceptHoverEvents(true);
}
bool paintingEnabled;
MapPixmapItem::PaintMode paintingMode;
Map *map;
MetatileSelector *metatileSelector;
Settings *settings;
@@ -46,6 +51,8 @@ private:
void paintSmartPath(int x, int y);
static QList<int> smartPathTable;
void paint_object(QGraphicsSceneMouseEvent*);// ?
signals:
void startPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *);
void endPaint(QGraphicsSceneMouseEvent *, MapPixmapItem *);