add open script button next to script labels

This commit is contained in:
garak
2022-08-31 18:53:07 -04:00
parent 582405d68b
commit 43960d4e9e
8 changed files with 103 additions and 200 deletions

View File

@@ -107,6 +107,7 @@ public:
bool hasUnsavedChanges();
bool isWithinBounds(int x, int y);
bool isWithinBorderBounds(int x, int y);
void openScript(QString label);
MapPixmapItem *mapItem = nullptr;
void setMapItem(MapPixmapItem *item) { mapItem = item; }
@@ -127,6 +128,7 @@ signals:
void mapChanged(Map *map);
void mapDimensionsChanged(const QSize &size);
void mapNeedsRedrawing();
void openScriptRequested(QString label);
};
#endif // MAP_H

View File

@@ -97,7 +97,6 @@ public:
void selectMapEvent(DraggablePixmapItem *object);
void selectMapEvent(DraggablePixmapItem *object, bool toggle);
DraggablePixmapItem *addNewEvent(Event::Type type);
void deleteEvent(Event *);
void updateSelectedEvents();
void duplicateSelectedEvents();
void redrawObject(DraggablePixmapItem *item);
@@ -105,6 +104,8 @@ public:
void updateCursorRectPos(int x, int y);
void setCursorRectVisible(bool visible);
bool eventLimitReached(Map *, Event::Type);
QGraphicsScene *scene = nullptr;
QGraphicsPixmapItem *current_view = nullptr;
MapPixmapItem *map_item = nullptr;

View File

@@ -325,8 +325,6 @@ private:
DraggablePixmapItem *selectedBG;
DraggablePixmapItem *selectedHealspot;
QVector<QToolButton *> openScriptButtons;
bool isProgrammaticEventTabChange;
bool projectHasUnsavedChanges;
bool projectOpenFailure = false;

View File

@@ -76,6 +76,7 @@ public:
NoScrollSpinBox *spinner_radius_x;
NoScrollSpinBox *spinner_radius_y;
NoScrollComboBox *combo_script;
QToolButton *button_script;
NoScrollComboBox *combo_flag;
NoScrollComboBox *combo_trainer_type;
NoScrollComboBox *combo_radius_treeid;