Move files into src/
2252
editor.cpp → src/editor.cpp
Executable file → Normal file
518
editor.h → src/editor.h
Executable file → Normal file
|
@ -1,259 +1,259 @@
|
||||||
#ifndef EDITOR_H
|
#ifndef EDITOR_H
|
||||||
#define EDITOR_H
|
#define EDITOR_H
|
||||||
|
|
||||||
#include <QGraphicsScene>
|
#include <QGraphicsScene>
|
||||||
#include <QGraphicsItemGroup>
|
#include <QGraphicsItemGroup>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
#include <QGraphicsItemAnimation>
|
#include <QGraphicsItemAnimation>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QCursor>
|
#include <QCursor>
|
||||||
|
|
||||||
#include "mapconnection.h"
|
#include "mapconnection.h"
|
||||||
#include "metatileselector.h"
|
#include "metatileselector.h"
|
||||||
#include "movementpermissionsselector.h"
|
#include "movementpermissionsselector.h"
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
#include "bordermetatilespixmapitem.h"
|
#include "bordermetatilespixmapitem.h"
|
||||||
#include "connectionpixmapitem.h"
|
#include "connectionpixmapitem.h"
|
||||||
#include "currentselectedmetatilespixmapitem.h"
|
#include "currentselectedmetatilespixmapitem.h"
|
||||||
#include "collisionpixmapitem.h"
|
#include "collisionpixmapitem.h"
|
||||||
#include "mappixmapitem.h"
|
#include "mappixmapitem.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
|
||||||
class DraggablePixmapItem;
|
class DraggablePixmapItem;
|
||||||
class MetatilesPixmapItem;
|
class MetatilesPixmapItem;
|
||||||
|
|
||||||
class Editor : public QObject
|
class Editor : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
Editor(Ui::MainWindow* ui);
|
Editor(Ui::MainWindow* ui);
|
||||||
public:
|
public:
|
||||||
Ui::MainWindow* ui;
|
Ui::MainWindow* ui;
|
||||||
QObject *parent = nullptr;
|
QObject *parent = nullptr;
|
||||||
Project *project = nullptr;
|
Project *project = nullptr;
|
||||||
Map *map = nullptr;
|
Map *map = nullptr;
|
||||||
Settings *settings;
|
Settings *settings;
|
||||||
void saveProject();
|
void saveProject();
|
||||||
void save();
|
void save();
|
||||||
void undo();
|
void undo();
|
||||||
void redo();
|
void redo();
|
||||||
void setMap(QString map_name);
|
void setMap(QString map_name);
|
||||||
void displayMap();
|
void displayMap();
|
||||||
void displayMetatileSelector();
|
void displayMetatileSelector();
|
||||||
void displayMapMetatiles();
|
void displayMapMetatiles();
|
||||||
void displayMapMovementPermissions();
|
void displayMapMovementPermissions();
|
||||||
void displayBorderMetatiles();
|
void displayBorderMetatiles();
|
||||||
void displayCurrentMetatilesSelection();
|
void displayCurrentMetatilesSelection();
|
||||||
void redrawCurrentMetatilesSelection();
|
void redrawCurrentMetatilesSelection();
|
||||||
void displayMovementPermissionSelector();
|
void displayMovementPermissionSelector();
|
||||||
void displayElevationMetatiles();
|
void displayElevationMetatiles();
|
||||||
void displayMapEvents();
|
void displayMapEvents();
|
||||||
void displayMapConnections();
|
void displayMapConnections();
|
||||||
void displayMapBorder();
|
void displayMapBorder();
|
||||||
void displayMapGrid();
|
void displayMapGrid();
|
||||||
|
|
||||||
void setEditingMap();
|
void setEditingMap();
|
||||||
void setEditingCollision();
|
void setEditingCollision();
|
||||||
void setEditingObjects();
|
void setEditingObjects();
|
||||||
void setEditingConnections();
|
void setEditingConnections();
|
||||||
void setCurrentConnectionDirection(QString curDirection);
|
void setCurrentConnectionDirection(QString curDirection);
|
||||||
void updateCurrentConnectionDirection(QString curDirection);
|
void updateCurrentConnectionDirection(QString curDirection);
|
||||||
void setConnectionsVisibility(bool visible);
|
void setConnectionsVisibility(bool visible);
|
||||||
void updateConnectionOffset(int offset);
|
void updateConnectionOffset(int offset);
|
||||||
void setConnectionMap(QString mapName);
|
void setConnectionMap(QString mapName);
|
||||||
void addNewConnection();
|
void addNewConnection();
|
||||||
void removeCurrentConnection();
|
void removeCurrentConnection();
|
||||||
void updateDiveMap(QString mapName);
|
void updateDiveMap(QString mapName);
|
||||||
void updateEmergeMap(QString mapName);
|
void updateEmergeMap(QString mapName);
|
||||||
void setSelectedConnectionFromMap(QString mapName);
|
void setSelectedConnectionFromMap(QString mapName);
|
||||||
void updatePrimaryTileset(QString tilesetLabel);
|
void updatePrimaryTileset(QString tilesetLabel);
|
||||||
void updateSecondaryTileset(QString tilesetLabel);
|
void updateSecondaryTileset(QString tilesetLabel);
|
||||||
void toggleBorderVisibility(bool visible);
|
void toggleBorderVisibility(bool visible);
|
||||||
|
|
||||||
DraggablePixmapItem *addMapEvent(Event *event);
|
DraggablePixmapItem *addMapEvent(Event *event);
|
||||||
void selectMapEvent(DraggablePixmapItem *object);
|
void selectMapEvent(DraggablePixmapItem *object);
|
||||||
void selectMapEvent(DraggablePixmapItem *object, bool toggle);
|
void selectMapEvent(DraggablePixmapItem *object, bool toggle);
|
||||||
DraggablePixmapItem *addNewEvent(QString event_type);
|
DraggablePixmapItem *addNewEvent(QString event_type);
|
||||||
Event* createNewEvent(QString event_type);
|
Event* createNewEvent(QString event_type);
|
||||||
void deleteEvent(Event *);
|
void deleteEvent(Event *);
|
||||||
void updateSelectedEvents();
|
void updateSelectedEvents();
|
||||||
void redrawObject(DraggablePixmapItem *item);
|
void redrawObject(DraggablePixmapItem *item);
|
||||||
QList<DraggablePixmapItem *> *getObjects();
|
QList<DraggablePixmapItem *> *getObjects();
|
||||||
|
|
||||||
QGraphicsScene *scene = nullptr;
|
QGraphicsScene *scene = nullptr;
|
||||||
QGraphicsPixmapItem *current_view = nullptr;
|
QGraphicsPixmapItem *current_view = nullptr;
|
||||||
MapPixmapItem *map_item = nullptr;
|
MapPixmapItem *map_item = nullptr;
|
||||||
ConnectionPixmapItem* selected_connection_item = nullptr;
|
ConnectionPixmapItem* selected_connection_item = nullptr;
|
||||||
QList<QGraphicsPixmapItem*> connection_items;
|
QList<QGraphicsPixmapItem*> connection_items;
|
||||||
QList<ConnectionPixmapItem*> connection_edit_items;
|
QList<ConnectionPixmapItem*> connection_edit_items;
|
||||||
CollisionPixmapItem *collision_item = nullptr;
|
CollisionPixmapItem *collision_item = nullptr;
|
||||||
QGraphicsItemGroup *events_group = nullptr;
|
QGraphicsItemGroup *events_group = nullptr;
|
||||||
QList<QGraphicsPixmapItem*> borderItems;
|
QList<QGraphicsPixmapItem*> borderItems;
|
||||||
QList<QGraphicsLineItem*> gridLines;
|
QList<QGraphicsLineItem*> gridLines;
|
||||||
|
|
||||||
QGraphicsScene *scene_metatiles = nullptr;
|
QGraphicsScene *scene_metatiles = nullptr;
|
||||||
QGraphicsScene *scene_current_metatile_selection = nullptr;
|
QGraphicsScene *scene_current_metatile_selection = nullptr;
|
||||||
QGraphicsScene *scene_selected_border_metatiles = nullptr;
|
QGraphicsScene *scene_selected_border_metatiles = nullptr;
|
||||||
QGraphicsScene *scene_collision_metatiles = nullptr;
|
QGraphicsScene *scene_collision_metatiles = nullptr;
|
||||||
QGraphicsScene *scene_elevation_metatiles = nullptr;
|
QGraphicsScene *scene_elevation_metatiles = nullptr;
|
||||||
MetatileSelector *metatile_selector_item = nullptr;
|
MetatileSelector *metatile_selector_item = nullptr;
|
||||||
|
|
||||||
BorderMetatilesPixmapItem *selected_border_metatiles_item = nullptr;
|
BorderMetatilesPixmapItem *selected_border_metatiles_item = nullptr;
|
||||||
CurrentSelectedMetatilesPixmapItem *scene_current_metatile_selection_item = nullptr;
|
CurrentSelectedMetatilesPixmapItem *scene_current_metatile_selection_item = nullptr;
|
||||||
MovementPermissionsSelector *movement_permissions_selector_item = nullptr;
|
MovementPermissionsSelector *movement_permissions_selector_item = nullptr;
|
||||||
|
|
||||||
QList<DraggablePixmapItem*> *events = nullptr;
|
QList<DraggablePixmapItem*> *events = nullptr;
|
||||||
QList<DraggablePixmapItem*> *selected_events = nullptr;
|
QList<DraggablePixmapItem*> *selected_events = nullptr;
|
||||||
|
|
||||||
QString map_edit_mode;
|
QString map_edit_mode;
|
||||||
QString prev_edit_mode;
|
QString prev_edit_mode;
|
||||||
|
|
||||||
void objectsView_onMousePress(QMouseEvent *event);
|
void objectsView_onMousePress(QMouseEvent *event);
|
||||||
void objectsView_onMouseMove(QMouseEvent *event);
|
void objectsView_onMouseMove(QMouseEvent *event);
|
||||||
void objectsView_onMouseRelease(QMouseEvent *event);
|
void objectsView_onMouseRelease(QMouseEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setConnectionItemsVisible(bool);
|
void setConnectionItemsVisible(bool);
|
||||||
void setBorderItemsVisible(bool, qreal = 1);
|
void setBorderItemsVisible(bool, qreal = 1);
|
||||||
void setConnectionEditControlValues(MapConnection*);
|
void setConnectionEditControlValues(MapConnection*);
|
||||||
void setConnectionEditControlsEnabled(bool);
|
void setConnectionEditControlsEnabled(bool);
|
||||||
void createConnectionItem(MapConnection* connection, bool hide);
|
void createConnectionItem(MapConnection* connection, bool hide);
|
||||||
void populateConnectionMapPickers();
|
void populateConnectionMapPickers();
|
||||||
void setDiveEmergeControls();
|
void setDiveEmergeControls();
|
||||||
void updateDiveEmergeMap(QString mapName, QString direction);
|
void updateDiveEmergeMap(QString mapName, QString direction);
|
||||||
void onConnectionOffsetChanged(int newOffset);
|
void onConnectionOffsetChanged(int newOffset);
|
||||||
void removeMirroredConnection(MapConnection*);
|
void removeMirroredConnection(MapConnection*);
|
||||||
void updateMirroredConnectionOffset(MapConnection*);
|
void updateMirroredConnectionOffset(MapConnection*);
|
||||||
void updateMirroredConnectionDirection(MapConnection*, QString);
|
void updateMirroredConnectionDirection(MapConnection*, QString);
|
||||||
void updateMirroredConnectionMap(MapConnection*, QString);
|
void updateMirroredConnectionMap(MapConnection*, QString);
|
||||||
void updateMirroredConnection(MapConnection*, QString, QString, bool isDelete = false);
|
void updateMirroredConnection(MapConnection*, QString, QString, bool isDelete = false);
|
||||||
Event* createNewObjectEvent();
|
Event* createNewObjectEvent();
|
||||||
Event* createNewWarpEvent();
|
Event* createNewWarpEvent();
|
||||||
Event* createNewHealLocationEvent();
|
Event* createNewHealLocationEvent();
|
||||||
Event* createNewCoordScriptEvent();
|
Event* createNewCoordScriptEvent();
|
||||||
Event* createNewCoordWeatherEvent();
|
Event* createNewCoordWeatherEvent();
|
||||||
Event* createNewSignEvent();
|
Event* createNewSignEvent();
|
||||||
Event* createNewHiddenItemEvent();
|
Event* createNewHiddenItemEvent();
|
||||||
Event* createNewSecretBaseEvent();
|
Event* createNewSecretBaseEvent();
|
||||||
QString getMovementPermissionText(uint16_t collision, uint16_t elevation);
|
QString getMovementPermissionText(uint16_t collision, uint16_t elevation);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item);
|
void mouseEvent_map(QGraphicsSceneMouseEvent *event, MapPixmapItem *item);
|
||||||
void mouseEvent_collision(QGraphicsSceneMouseEvent *event, CollisionPixmapItem *item);
|
void mouseEvent_collision(QGraphicsSceneMouseEvent *event, CollisionPixmapItem *item);
|
||||||
void onConnectionMoved(MapConnection*);
|
void onConnectionMoved(MapConnection*);
|
||||||
void onConnectionItemSelected(ConnectionPixmapItem* connectionItem);
|
void onConnectionItemSelected(ConnectionPixmapItem* connectionItem);
|
||||||
void onConnectionItemDoubleClicked(ConnectionPixmapItem* connectionItem);
|
void onConnectionItemDoubleClicked(ConnectionPixmapItem* connectionItem);
|
||||||
void onConnectionDirectionChanged(QString newDirection);
|
void onConnectionDirectionChanged(QString newDirection);
|
||||||
void onBorderMetatilesChanged();
|
void onBorderMetatilesChanged();
|
||||||
void onHoveredMovementPermissionChanged(uint16_t, uint16_t);
|
void onHoveredMovementPermissionChanged(uint16_t, uint16_t);
|
||||||
void onHoveredMovementPermissionCleared();
|
void onHoveredMovementPermissionCleared();
|
||||||
void onHoveredMetatileSelectionChanged(uint16_t);
|
void onHoveredMetatileSelectionChanged(uint16_t);
|
||||||
void onHoveredMetatileSelectionCleared();
|
void onHoveredMetatileSelectionCleared();
|
||||||
void onHoveredMapMetatileChanged(int, int);
|
void onHoveredMapMetatileChanged(int, int);
|
||||||
void onHoveredMapMetatileCleared();
|
void onHoveredMapMetatileCleared();
|
||||||
void onHoveredMapMovementPermissionChanged(int, int);
|
void onHoveredMapMovementPermissionChanged(int, int);
|
||||||
void onHoveredMapMovementPermissionCleared();
|
void onHoveredMapMovementPermissionCleared();
|
||||||
void onSelectedMetatilesChanged();
|
void onSelectedMetatilesChanged();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void objectsChanged();
|
void objectsChanged();
|
||||||
void selectedObjectsChanged();
|
void selectedObjectsChanged();
|
||||||
void loadMapRequested(QString, QString);
|
void loadMapRequested(QString, QString);
|
||||||
void tilesetChanged(QString);
|
void tilesetChanged(QString);
|
||||||
void warpEventDoubleClicked(QString mapName, QString warpNum);
|
void warpEventDoubleClicked(QString mapName, QString warpNum);
|
||||||
void currentMetatilesSelectionChanged();
|
void currentMetatilesSelectionChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DraggablePixmapItem : public QObject, public QGraphicsPixmapItem {
|
class DraggablePixmapItem : public QObject, public QGraphicsPixmapItem {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
DraggablePixmapItem(QPixmap pixmap): QGraphicsPixmapItem(pixmap) {
|
DraggablePixmapItem(QPixmap pixmap): QGraphicsPixmapItem(pixmap) {
|
||||||
}
|
}
|
||||||
Editor *editor = nullptr;
|
Editor *editor = nullptr;
|
||||||
Event *event = nullptr;
|
Event *event = nullptr;
|
||||||
QGraphicsItemAnimation *pos_anim = nullptr;
|
QGraphicsItemAnimation *pos_anim = nullptr;
|
||||||
DraggablePixmapItem(Event *event_, Editor *editor_) : QGraphicsPixmapItem(event_->pixmap) {
|
DraggablePixmapItem(Event *event_, Editor *editor_) : QGraphicsPixmapItem(event_->pixmap) {
|
||||||
event = event_;
|
event = event_;
|
||||||
editor = editor_;
|
editor = editor_;
|
||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
bool active;
|
bool active;
|
||||||
int last_x;
|
int last_x;
|
||||||
int last_y;
|
int last_y;
|
||||||
void updatePosition() {
|
void updatePosition() {
|
||||||
int x = event->getPixelX();
|
int x = event->getPixelX();
|
||||||
int y = event->getPixelY();
|
int y = event->getPixelY();
|
||||||
setX(x);
|
setX(x);
|
||||||
setY(y);
|
setY(y);
|
||||||
setZValue(event->y());
|
setZValue(event->y());
|
||||||
}
|
}
|
||||||
void move(int x, int y);
|
void move(int x, int y);
|
||||||
void emitPositionChanged() {
|
void emitPositionChanged() {
|
||||||
emit xChanged(event->x());
|
emit xChanged(event->x());
|
||||||
emit yChanged(event->y());
|
emit yChanged(event->y());
|
||||||
emit elevationChanged(event->elevation());
|
emit elevationChanged(event->elevation());
|
||||||
}
|
}
|
||||||
void updatePixmap() {
|
void updatePixmap() {
|
||||||
QList<Event*> objects;
|
QList<Event*> objects;
|
||||||
objects.append(event);
|
objects.append(event);
|
||||||
event->pixmap = QPixmap();
|
event->pixmap = QPixmap();
|
||||||
editor->project->loadEventPixmaps(objects);
|
editor->project->loadEventPixmaps(objects);
|
||||||
this->updatePosition();
|
this->updatePosition();
|
||||||
editor->redrawObject(this);
|
editor->redrawObject(this);
|
||||||
emit spriteChanged(event->pixmap);
|
emit spriteChanged(event->pixmap);
|
||||||
}
|
}
|
||||||
void bind(QComboBox *combo, QString key) {
|
void bind(QComboBox *combo, QString key) {
|
||||||
connect(combo, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged),
|
connect(combo, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentTextChanged),
|
||||||
this, [this, key](QString value){
|
this, [this, key](QString value){
|
||||||
this->event->put(key, value);
|
this->event->put(key, value);
|
||||||
});
|
});
|
||||||
connect(this, &DraggablePixmapItem::onPropertyChanged,
|
connect(this, &DraggablePixmapItem::onPropertyChanged,
|
||||||
this, [combo, key](QString key2, QString value){
|
this, [combo, key](QString key2, QString value){
|
||||||
if (key2 == key) {
|
if (key2 == key) {
|
||||||
combo->addItem(value);
|
combo->addItem(value);
|
||||||
combo->setCurrentText(value);
|
combo->setCurrentText(value);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void positionChanged(Event *event);
|
void positionChanged(Event *event);
|
||||||
void xChanged(int);
|
void xChanged(int);
|
||||||
void yChanged(int);
|
void yChanged(int);
|
||||||
void elevationChanged(int);
|
void elevationChanged(int);
|
||||||
void spriteChanged(QPixmap pixmap);
|
void spriteChanged(QPixmap pixmap);
|
||||||
void onPropertyChanged(QString key, QString value);
|
void onPropertyChanged(QString key, QString value);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void set_x(const QString &text) {
|
void set_x(const QString &text) {
|
||||||
event->put("x", text);
|
event->put("x", text);
|
||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
void set_y(const QString &text) {
|
void set_y(const QString &text) {
|
||||||
event->put("y", text);
|
event->put("y", text);
|
||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
void set_elevation(const QString &text) {
|
void set_elevation(const QString &text) {
|
||||||
event->put("elevation", text);
|
event->put("elevation", text);
|
||||||
updatePosition();
|
updatePosition();
|
||||||
}
|
}
|
||||||
void set_sprite(const QString &text) {
|
void set_sprite(const QString &text) {
|
||||||
event->put("sprite", text);
|
event->put("sprite", text);
|
||||||
updatePixmap();
|
updatePixmap();
|
||||||
}
|
}
|
||||||
void set_script(const QString &text) {
|
void set_script(const QString &text) {
|
||||||
event->put("script_label", text);
|
event->put("script_label", text);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QGraphicsSceneMouseEvent*);
|
void mousePressEvent(QGraphicsSceneMouseEvent*);
|
||||||
void mouseMoveEvent(QGraphicsSceneMouseEvent*);
|
void mouseMoveEvent(QGraphicsSceneMouseEvent*);
|
||||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
|
void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
|
||||||
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
|
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EDITOR_H
|
#endif // EDITOR_H
|
572
eventpropertiesframe.ui → src/eventpropertiesframe.ui
Executable file → Normal file
|
@ -1,286 +1,286 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ObjectPropertiesFrame</class>
|
<class>ObjectPropertiesFrame</class>
|
||||||
<widget class="QFrame" name="ObjectPropertiesFrame">
|
<widget class="QFrame" name="ObjectPropertiesFrame">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>284</width>
|
<width>284</width>
|
||||||
<height>146</height>
|
<height>146</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>284</width>
|
<width>284</width>
|
||||||
<height>90</height>
|
<height>90</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Frame</string>
|
<string>Frame</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="layoutDirection">
|
<property name="layoutDirection">
|
||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="lineWidth">
|
<property name="lineWidth">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_spritePixmap">
|
<widget class="QLabel" name="label_spritePixmap">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>64</width>
|
<width>64</width>
|
||||||
<height>64</height>
|
<height>64</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::Box</enum>
|
<enum>QFrame::Box</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Sunken</enum>
|
<enum>QFrame::Sunken</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="scaledContents">
|
<property name="scaledContents">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="indent">
|
<property name="indent">
|
||||||
<number>-1</number>
|
<number>-1</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_name">
|
<widget class="QLabel" name="label_name">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Object 1</string>
|
<string>Object 1</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="x">
|
<layout class="QHBoxLayout" name="x">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_x">
|
<widget class="QLabel" name="label_x">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>X</string>
|
<string>X</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="NoScrollSpinBox" name="spinBox_x">
|
<widget class="NoScrollSpinBox" name="spinBox_x">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The X coordinate of this object.</p></body></html></string>
|
<string><html><head/><body><p>The X coordinate of this object.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-32768</number>
|
<number>-32768</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>32767</number>
|
<number>32767</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="y">
|
<layout class="QHBoxLayout" name="y">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_y">
|
<widget class="QLabel" name="label_y">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Y</string>
|
<string>Y</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="NoScrollSpinBox" name="spinBox_y">
|
<widget class="NoScrollSpinBox" name="spinBox_y">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The Y coordinate of this object.</p></body></html></string>
|
<string><html><head/><body><p>The Y coordinate of this object.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-32768</number>
|
<number>-32768</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>32767</number>
|
<number>32767</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="z">
|
<layout class="QHBoxLayout" name="z">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Z</string>
|
<string>Z</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="NoScrollSpinBox" name="spinBox_z">
|
<widget class="NoScrollSpinBox" name="spinBox_z">
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The elevation of this object.</p></body></html></string>
|
<string><html><head/><body><p>The elevation of this object.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<number>15</number>
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="sprite" native="true">
|
<widget class="QWidget" name="sprite" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout_sprite">
|
<layout class="QFormLayout" name="formLayout_sprite">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_sprite">
|
<widget class="QLabel" name="label_sprite">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sprite</string>
|
<string>Sprite</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>comboBox_sprite</cstring>
|
<cstring>comboBox_sprite</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="NoScrollComboBox" name="comboBox_sprite">
|
<widget class="NoScrollComboBox" name="comboBox_sprite">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The sprite graphics to use for this object.</p></body></html></string>
|
<string><html><head/><body><p>The sprite graphics to use for this object.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="editable">
|
<property name="editable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentText">
|
<property name="currentText">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="maxVisibleItems">
|
<property name="maxVisibleItems">
|
||||||
<number>25</number>
|
<number>25</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeAdjustPolicy">
|
<property name="sizeAdjustPolicy">
|
||||||
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
|
<enum>QComboBox::AdjustToContentsOnFirstShow</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>NoScrollComboBox</class>
|
<class>NoScrollComboBox</class>
|
||||||
<extends>QComboBox</extends>
|
<extends>QComboBox</extends>
|
||||||
<header>noscrollcombobox.h</header>
|
<header>noscrollcombobox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>NoScrollSpinBox</class>
|
<class>NoScrollSpinBox</class>
|
||||||
<extends>QSpinBox</extends>
|
<extends>QSpinBox</extends>
|
||||||
<header>noscrollspinbox.h</header>
|
<header>noscrollspinbox.h</header>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>spinBox_x</tabstop>
|
<tabstop>spinBox_x</tabstop>
|
||||||
<tabstop>spinBox_y</tabstop>
|
<tabstop>spinBox_y</tabstop>
|
||||||
<tabstop>spinBox_z</tabstop>
|
<tabstop>spinBox_z</tabstop>
|
||||||
<tabstop>comboBox_sprite</tabstop>
|
<tabstop>comboBox_sprite</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
24
main.cpp → src/main.cpp
Executable file → Normal file
|
@ -1,12 +1,12 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
a.setStyle("fusion");
|
a.setStyle("fusion");
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
w.show();
|
w.show();
|
||||||
|
|
||||||
return a.exec();
|
return a.exec();
|
||||||
}
|
}
|
2396
mainwindow.cpp → src/mainwindow.cpp
Executable file → Normal file
314
mainwindow.h → src/mainwindow.h
Executable file → Normal file
|
@ -1,157 +1,157 @@
|
||||||
#ifndef MAINWINDOW_H
|
#ifndef MAINWINDOW_H
|
||||||
#define MAINWINDOW_H
|
#define MAINWINDOW_H
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
#include <QGraphicsPixmapItem>
|
#include <QGraphicsPixmapItem>
|
||||||
#include <QGraphicsItemGroup>
|
#include <QGraphicsItemGroup>
|
||||||
#include <QGraphicsSceneMouseEvent>
|
#include <QGraphicsSceneMouseEvent>
|
||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
class MainWindow : public QMainWindow
|
class MainWindow : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MainWindow(QWidget *parent = nullptr);
|
explicit MainWindow(QWidget *parent = nullptr);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_action_Open_Project_triggered();
|
void on_action_Open_Project_triggered();
|
||||||
void on_mapList_activated(const QModelIndex &index);
|
void on_mapList_activated(const QModelIndex &index);
|
||||||
void on_action_Save_Project_triggered();
|
void on_action_Save_Project_triggered();
|
||||||
void openWarpMap(QString map_name, QString warp_num);
|
void openWarpMap(QString map_name, QString warp_num);
|
||||||
|
|
||||||
void undo();
|
void undo();
|
||||||
void redo();
|
void redo();
|
||||||
|
|
||||||
void openInTextEditor();
|
void openInTextEditor();
|
||||||
|
|
||||||
void onLoadMapRequested(QString, QString);
|
void onLoadMapRequested(QString, QString);
|
||||||
void onMapChanged(Map *map);
|
void onMapChanged(Map *map);
|
||||||
void onMapNeedsRedrawing();
|
void onMapNeedsRedrawing();
|
||||||
|
|
||||||
void on_action_Save_triggered();
|
void on_action_Save_triggered();
|
||||||
void on_tabWidget_2_currentChanged(int index);
|
void on_tabWidget_2_currentChanged(int index);
|
||||||
void on_action_Exit_triggered();
|
void on_action_Exit_triggered();
|
||||||
void on_comboBox_Song_activated(const QString &arg1);
|
void on_comboBox_Song_activated(const QString &arg1);
|
||||||
void on_comboBox_Location_activated(const QString &arg1);
|
void on_comboBox_Location_activated(const QString &arg1);
|
||||||
void on_comboBox_Visibility_activated(const QString &arg1);
|
void on_comboBox_Visibility_activated(const QString &arg1);
|
||||||
void on_comboBox_Weather_activated(const QString &arg1);
|
void on_comboBox_Weather_activated(const QString &arg1);
|
||||||
void on_comboBox_Type_activated(const QString &arg1);
|
void on_comboBox_Type_activated(const QString &arg1);
|
||||||
void on_comboBox_BattleScene_activated(const QString &arg1);
|
void on_comboBox_BattleScene_activated(const QString &arg1);
|
||||||
void on_checkBox_ShowLocation_clicked(bool checked);
|
void on_checkBox_ShowLocation_clicked(bool checked);
|
||||||
|
|
||||||
void on_tabWidget_currentChanged(int index);
|
void on_tabWidget_currentChanged(int index);
|
||||||
|
|
||||||
void on_actionUndo_triggered();
|
void on_actionUndo_triggered();
|
||||||
|
|
||||||
void on_actionRedo_triggered();
|
void on_actionRedo_triggered();
|
||||||
|
|
||||||
void on_actionZoom_In_triggered();
|
void on_actionZoom_In_triggered();
|
||||||
void on_actionZoom_Out_triggered();
|
void on_actionZoom_Out_triggered();
|
||||||
void on_actionBetter_Cursors_triggered();
|
void on_actionBetter_Cursors_triggered();
|
||||||
void on_actionPencil_triggered();
|
void on_actionPencil_triggered();
|
||||||
void on_actionPointer_triggered();
|
void on_actionPointer_triggered();
|
||||||
void on_actionFlood_Fill_triggered();
|
void on_actionFlood_Fill_triggered();
|
||||||
void on_actionEyedropper_triggered();
|
void on_actionEyedropper_triggered();
|
||||||
void on_actionMove_triggered();
|
void on_actionMove_triggered();
|
||||||
void on_actionMap_Shift_triggered();
|
void on_actionMap_Shift_triggered();
|
||||||
|
|
||||||
void on_toolButton_deleteObject_clicked();
|
void on_toolButton_deleteObject_clicked();
|
||||||
void on_toolButton_Open_Scripts_clicked();
|
void on_toolButton_Open_Scripts_clicked();
|
||||||
|
|
||||||
void addNewEvent(QString);
|
void addNewEvent(QString);
|
||||||
void updateSelectedObjects();
|
void updateSelectedObjects();
|
||||||
|
|
||||||
void on_toolButton_Paint_clicked();
|
void on_toolButton_Paint_clicked();
|
||||||
|
|
||||||
void on_toolButton_Select_clicked();
|
void on_toolButton_Select_clicked();
|
||||||
|
|
||||||
void on_toolButton_Fill_clicked();
|
void on_toolButton_Fill_clicked();
|
||||||
|
|
||||||
void on_toolButton_Dropper_clicked();
|
void on_toolButton_Dropper_clicked();
|
||||||
|
|
||||||
void on_toolButton_Move_clicked();
|
void on_toolButton_Move_clicked();
|
||||||
|
|
||||||
void on_toolButton_Shift_clicked();
|
void on_toolButton_Shift_clicked();
|
||||||
|
|
||||||
void onOpenMapListContextMenu(const QPoint &point);
|
void onOpenMapListContextMenu(const QPoint &point);
|
||||||
void onAddNewMapToGroupClick(QAction* triggeredAction);
|
void onAddNewMapToGroupClick(QAction* triggeredAction);
|
||||||
void onTilesetChanged(QString);
|
void onTilesetChanged(QString);
|
||||||
void currentMetatilesSelectionChanged();
|
void currentMetatilesSelectionChanged();
|
||||||
|
|
||||||
void on_action_Export_Map_Image_triggered();
|
void on_action_Export_Map_Image_triggered();
|
||||||
|
|
||||||
void on_comboBox_ConnectionDirection_currentIndexChanged(const QString &arg1);
|
void on_comboBox_ConnectionDirection_currentIndexChanged(const QString &arg1);
|
||||||
|
|
||||||
void on_spinBox_ConnectionOffset_valueChanged(int offset);
|
void on_spinBox_ConnectionOffset_valueChanged(int offset);
|
||||||
|
|
||||||
void on_comboBox_ConnectedMap_currentTextChanged(const QString &mapName);
|
void on_comboBox_ConnectedMap_currentTextChanged(const QString &mapName);
|
||||||
|
|
||||||
void on_pushButton_AddConnection_clicked();
|
void on_pushButton_AddConnection_clicked();
|
||||||
|
|
||||||
void on_pushButton_RemoveConnection_clicked();
|
void on_pushButton_RemoveConnection_clicked();
|
||||||
|
|
||||||
void on_comboBox_DiveMap_currentTextChanged(const QString &mapName);
|
void on_comboBox_DiveMap_currentTextChanged(const QString &mapName);
|
||||||
|
|
||||||
void on_comboBox_EmergeMap_currentTextChanged(const QString &mapName);
|
void on_comboBox_EmergeMap_currentTextChanged(const QString &mapName);
|
||||||
|
|
||||||
void on_comboBox_PrimaryTileset_activated(const QString &arg1);
|
void on_comboBox_PrimaryTileset_activated(const QString &arg1);
|
||||||
|
|
||||||
void on_comboBox_SecondaryTileset_activated(const QString &arg1);
|
void on_comboBox_SecondaryTileset_activated(const QString &arg1);
|
||||||
|
|
||||||
void on_pushButton_clicked();
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
void on_checkBox_smartPaths_stateChanged(int selected);
|
void on_checkBox_smartPaths_stateChanged(int selected);
|
||||||
|
|
||||||
void on_checkBox_Visibility_clicked(bool checked);
|
void on_checkBox_Visibility_clicked(bool checked);
|
||||||
|
|
||||||
void on_checkBox_ToggleBorder_stateChanged(int arg1);
|
void on_checkBox_ToggleBorder_stateChanged(int arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QStandardItemModel *mapListModel;
|
QStandardItemModel *mapListModel;
|
||||||
QList<QStandardItem*> *mapGroupsModel;
|
QList<QStandardItem*> *mapGroupsModel;
|
||||||
Editor *editor = nullptr;
|
Editor *editor = nullptr;
|
||||||
QIcon* mapIcon;
|
QIcon* mapIcon;
|
||||||
void setMap(QString);
|
void setMap(QString);
|
||||||
void redrawMapScene();
|
void redrawMapScene();
|
||||||
void loadDataStructures();
|
void loadDataStructures();
|
||||||
void populateMapList();
|
void populateMapList();
|
||||||
QString getExistingDirectory(QString);
|
QString getExistingDirectory(QString);
|
||||||
void openProject(QString dir);
|
void openProject(QString dir);
|
||||||
QString getDefaultMap();
|
QString getDefaultMap();
|
||||||
void setRecentMap(QString map_name);
|
void setRecentMap(QString map_name);
|
||||||
QStandardItem* createMapItem(QString mapName, int groupNum, int inGroupNum);
|
QStandardItem* createMapItem(QString mapName, int groupNum, int inGroupNum);
|
||||||
|
|
||||||
void markAllEdited(QAbstractItemModel *model);
|
void markAllEdited(QAbstractItemModel *model);
|
||||||
void markEdited(QModelIndex index);
|
void markEdited(QModelIndex index);
|
||||||
void updateMapList();
|
void updateMapList();
|
||||||
|
|
||||||
void displayMapProperties();
|
void displayMapProperties();
|
||||||
void checkToolButtons();
|
void checkToolButtons();
|
||||||
|
|
||||||
void scaleMapView(int);
|
void scaleMapView(int);
|
||||||
void initExtraShortcuts();
|
void initExtraShortcuts();
|
||||||
void initExtraSignals();
|
void initExtraSignals();
|
||||||
void initEditor();
|
void initEditor();
|
||||||
void loadUserSettings();
|
void loadUserSettings();
|
||||||
void openRecentProject();
|
void openRecentProject();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MapListUserRoles {
|
enum MapListUserRoles {
|
||||||
GroupRole = Qt::UserRole + 1, // Used to hold the map group number.
|
GroupRole = Qt::UserRole + 1, // Used to hold the map group number.
|
||||||
TypeRole = Qt::UserRole + 2, // Used to differentiate between the different layers of the map list tree view.
|
TypeRole = Qt::UserRole + 2, // Used to differentiate between the different layers of the map list tree view.
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
4588
mainwindow.ui → src/mainwindow.ui
Executable file → Normal file
0
porymap.pro → src/porymap.pro
Executable file → Normal file
3520
project.cpp → src/project.cpp
Executable file → Normal file
304
project.h → src/project.h
Executable file → Normal file
|
@ -1,152 +1,152 @@
|
||||||
#ifndef PROJECT_H
|
#ifndef PROJECT_H
|
||||||
#define PROJECT_H
|
#define PROJECT_H
|
||||||
|
|
||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "blockdata.h"
|
#include "blockdata.h"
|
||||||
#include "heallocation.h"
|
#include "heallocation.h"
|
||||||
|
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QStandardItem>
|
#include <QStandardItem>
|
||||||
|
|
||||||
static QString NONE_MAP_CONSTANT = "MAP_NONE";
|
static QString NONE_MAP_CONSTANT = "MAP_NONE";
|
||||||
static QString NONE_MAP_NAME = "None";
|
static QString NONE_MAP_NAME = "None";
|
||||||
|
|
||||||
class Project
|
class Project
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Project();
|
Project();
|
||||||
QString root;
|
QString root;
|
||||||
QStringList *groupNames = nullptr;
|
QStringList *groupNames = nullptr;
|
||||||
QMap<QString, int> *map_groups;
|
QMap<QString, int> *map_groups;
|
||||||
QList<QStringList> groupedMapNames;
|
QList<QStringList> groupedMapNames;
|
||||||
QStringList *mapNames = nullptr;
|
QStringList *mapNames = nullptr;
|
||||||
QList<HealLocation> flyableMaps;
|
QList<HealLocation> flyableMaps;
|
||||||
QMap<QString, QString>* mapConstantsToMapNames;
|
QMap<QString, QString>* mapConstantsToMapNames;
|
||||||
QMap<QString, QString>* mapNamesToMapConstants;
|
QMap<QString, QString>* mapNamesToMapConstants;
|
||||||
QList<QString> mapLayoutsTable;
|
QList<QString> mapLayoutsTable;
|
||||||
QList<QString> mapLayoutsTableMaster;
|
QList<QString> mapLayoutsTableMaster;
|
||||||
QMap<QString, MapLayout*> mapLayouts;
|
QMap<QString, MapLayout*> mapLayouts;
|
||||||
QMap<QString, MapLayout*> mapLayoutsMaster;
|
QMap<QString, MapLayout*> mapLayoutsMaster;
|
||||||
QStringList *regionMapSections = nullptr;
|
QStringList *regionMapSections = nullptr;
|
||||||
QStringList *itemNames = nullptr;
|
QStringList *itemNames = nullptr;
|
||||||
QStringList *flagNames = nullptr;
|
QStringList *flagNames = nullptr;
|
||||||
QStringList *varNames = nullptr;
|
QStringList *varNames = nullptr;
|
||||||
QStringList *movementTypes = nullptr;
|
QStringList *movementTypes = nullptr;
|
||||||
QStringList *mapTypes = nullptr;
|
QStringList *mapTypes = nullptr;
|
||||||
QStringList *mapBattleScenes = nullptr;
|
QStringList *mapBattleScenes = nullptr;
|
||||||
QStringList *weatherNames = nullptr;
|
QStringList *weatherNames = nullptr;
|
||||||
QStringList *coordEventWeatherNames = nullptr;
|
QStringList *coordEventWeatherNames = nullptr;
|
||||||
QStringList *secretBaseIds = nullptr;
|
QStringList *secretBaseIds = nullptr;
|
||||||
QStringList *bgEventFacingDirections = nullptr;
|
QStringList *bgEventFacingDirections = nullptr;
|
||||||
QStringList mapsWithConnections;
|
QStringList mapsWithConnections;
|
||||||
|
|
||||||
QMap<QString, Map*> *map_cache;
|
QMap<QString, Map*> *map_cache;
|
||||||
Map* loadMap(QString);
|
Map* loadMap(QString);
|
||||||
Map* getMap(QString);
|
Map* getMap(QString);
|
||||||
|
|
||||||
QMap<QString, Tileset*> *tileset_cache = nullptr;
|
QMap<QString, Tileset*> *tileset_cache = nullptr;
|
||||||
Tileset* loadTileset(QString);
|
Tileset* loadTileset(QString);
|
||||||
Tileset* getTileset(QString);
|
Tileset* getTileset(QString);
|
||||||
|
|
||||||
Blockdata* readBlockdata(QString);
|
Blockdata* readBlockdata(QString);
|
||||||
void loadBlockdata(Map*);
|
void loadBlockdata(Map*);
|
||||||
|
|
||||||
QString readTextFile(QString path);
|
QString readTextFile(QString path);
|
||||||
void saveTextFile(QString path, QString text);
|
void saveTextFile(QString path, QString text);
|
||||||
void appendTextFile(QString path, QString text);
|
void appendTextFile(QString path, QString text);
|
||||||
void deleteFile(QString path);
|
void deleteFile(QString path);
|
||||||
|
|
||||||
void readMapGroups();
|
void readMapGroups();
|
||||||
Map* addNewMapToGroup(QString mapName, int groupNum);
|
Map* addNewMapToGroup(QString mapName, int groupNum);
|
||||||
QString getNewMapName();
|
QString getNewMapName();
|
||||||
QString getProjectTitle();
|
QString getProjectTitle();
|
||||||
|
|
||||||
QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
|
QList<QStringList>* getLabelMacros(QList<QStringList>*, QString);
|
||||||
QStringList* getLabelValues(QList<QStringList>*, QString);
|
QStringList* getLabelValues(QList<QStringList>*, QString);
|
||||||
void readMapHeader(Map*);
|
void readMapHeader(Map*);
|
||||||
void readMapLayoutsTable();
|
void readMapLayoutsTable();
|
||||||
void readAllMapLayouts();
|
void readAllMapLayouts();
|
||||||
QStringList* readLayoutValues(QString layoutName);
|
QStringList* readLayoutValues(QString layoutName);
|
||||||
void readMapLayout(Map*);
|
void readMapLayout(Map*);
|
||||||
void readMapsWithConnections();
|
void readMapsWithConnections();
|
||||||
void loadMapTilesets(Map*);
|
void loadMapTilesets(Map*);
|
||||||
void loadTilesetAssets(Tileset*);
|
void loadTilesetAssets(Tileset*);
|
||||||
|
|
||||||
void saveBlockdata(Map*);
|
void saveBlockdata(Map*);
|
||||||
void saveMapBorder(Map*);
|
void saveMapBorder(Map*);
|
||||||
void writeBlockdata(QString, Blockdata*);
|
void writeBlockdata(QString, Blockdata*);
|
||||||
void saveAllMaps();
|
void saveAllMaps();
|
||||||
void saveMap(Map*);
|
void saveMap(Map*);
|
||||||
void saveAllDataStructures();
|
void saveAllDataStructures();
|
||||||
void saveAllMapLayouts();
|
void saveAllMapLayouts();
|
||||||
void saveMapGroupsTable();
|
void saveMapGroupsTable();
|
||||||
void saveMapConstantsHeader();
|
void saveMapConstantsHeader();
|
||||||
void saveHealLocationStruct(Map*);
|
void saveHealLocationStruct(Map*);
|
||||||
|
|
||||||
QList<QStringList>* parseAsm(QString text);
|
QList<QStringList>* parseAsm(QString text);
|
||||||
QStringList getSongNames();
|
QStringList getSongNames();
|
||||||
QStringList getVisibilities();
|
QStringList getVisibilities();
|
||||||
QMap<QString, QStringList> getTilesets();
|
QMap<QString, QStringList> getTilesets();
|
||||||
void readTilesetProperties();
|
void readTilesetProperties();
|
||||||
void readRegionMapSections();
|
void readRegionMapSections();
|
||||||
void readItemNames();
|
void readItemNames();
|
||||||
void readFlagNames();
|
void readFlagNames();
|
||||||
void readVarNames();
|
void readVarNames();
|
||||||
void readMovementTypes();
|
void readMovementTypes();
|
||||||
void readMapTypes();
|
void readMapTypes();
|
||||||
void readMapBattleScenes();
|
void readMapBattleScenes();
|
||||||
void readWeatherNames();
|
void readWeatherNames();
|
||||||
void readCoordEventWeatherNames();
|
void readCoordEventWeatherNames();
|
||||||
void readSecretBaseIds();
|
void readSecretBaseIds();
|
||||||
void readBgEventFacingDirections();
|
void readBgEventFacingDirections();
|
||||||
|
|
||||||
void loadEventPixmaps(QList<Event*> objects);
|
void loadEventPixmaps(QList<Event*> objects);
|
||||||
QMap<QString, int> getEventObjGfxConstants();
|
QMap<QString, int> getEventObjGfxConstants();
|
||||||
QString fixGraphicPath(QString path);
|
QString fixGraphicPath(QString path);
|
||||||
|
|
||||||
void readMapEvents(Map *map);
|
void readMapEvents(Map *map);
|
||||||
void loadMapConnections(Map *map);
|
void loadMapConnections(Map *map);
|
||||||
|
|
||||||
void loadMapBorder(Map *map);
|
void loadMapBorder(Map *map);
|
||||||
|
|
||||||
void saveMapEvents(Map *map);
|
void saveMapEvents(Map *map);
|
||||||
|
|
||||||
QStringList readCArray(QString text, QString label);
|
QStringList readCArray(QString text, QString label);
|
||||||
QString readCIncbin(QString text, QString label);
|
QString readCIncbin(QString text, QString label);
|
||||||
QMap<QString, int> readCDefines(QString text, QStringList prefixes);
|
QMap<QString, int> readCDefines(QString text, QStringList prefixes);
|
||||||
|
|
||||||
static int getNumTilesPrimary();
|
static int getNumTilesPrimary();
|
||||||
static int getNumTilesTotal();
|
static int getNumTilesTotal();
|
||||||
static int getNumMetatilesPrimary();
|
static int getNumMetatilesPrimary();
|
||||||
static int getNumMetatilesTotal();
|
static int getNumMetatilesTotal();
|
||||||
static int getNumPalettesPrimary();
|
static int getNumPalettesPrimary();
|
||||||
static int getNumPalettesTotal();
|
static int getNumPalettesTotal();
|
||||||
private:
|
private:
|
||||||
QString getMapLayoutsTableFilepath();
|
QString getMapLayoutsTableFilepath();
|
||||||
QString getMapLayoutFilepath(QString);
|
QString getMapLayoutFilepath(QString);
|
||||||
void saveMapHeader(Map*);
|
void saveMapHeader(Map*);
|
||||||
void saveMapConnections(Map*);
|
void saveMapConnections(Map*);
|
||||||
void updateMapsWithConnections(Map*);
|
void updateMapsWithConnections(Map*);
|
||||||
void saveMapsWithConnections();
|
void saveMapsWithConnections();
|
||||||
void saveMapLayoutsTable();
|
void saveMapLayoutsTable();
|
||||||
void updateMapLayout(Map*);
|
void updateMapLayout(Map*);
|
||||||
void readCDefinesSorted(QString, QStringList, QStringList*);
|
void readCDefinesSorted(QString, QStringList, QStringList*);
|
||||||
void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
|
void readCDefinesSorted(QString, QStringList, QStringList*, QString, int);
|
||||||
|
|
||||||
void setNewMapHeader(Map* map, int mapIndex);
|
void setNewMapHeader(Map* map, int mapIndex);
|
||||||
void setNewMapLayout(Map* map);
|
void setNewMapLayout(Map* map);
|
||||||
void setNewMapBlockdata(Map* map);
|
void setNewMapBlockdata(Map* map);
|
||||||
void setNewMapBorder(Map *map);
|
void setNewMapBorder(Map *map);
|
||||||
void setNewMapEvents(Map *map);
|
void setNewMapEvents(Map *map);
|
||||||
void setNewMapConnections(Map *map);
|
void setNewMapConnections(Map *map);
|
||||||
|
|
||||||
static int num_tiles_primary;
|
static int num_tiles_primary;
|
||||||
static int num_tiles_total;
|
static int num_tiles_total;
|
||||||
static int num_metatiles_primary;
|
static int num_metatiles_primary;
|
||||||
static int num_metatiles_total;
|
static int num_metatiles_total;
|
||||||
static int num_pals_primary;
|
static int num_pals_primary;
|
||||||
static int num_pals_total;
|
static int num_pals_total;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PROJECT_H
|
#endif // PROJECT_H
|
0
resources/icons/add.ico → src/resources/icons/add.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/cursor.ico → src/resources/icons/cursor.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
0
resources/icons/delete.ico → src/resources/icons/delete.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/fill_color.ico → src/resources/icons/fill_color.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
Before (image error) Size: 4.2 KiB After (image error) Size: 4.2 KiB |
0
resources/icons/folder.ico → src/resources/icons/folder.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/folder_closed.ico → src/resources/icons/folder_closed.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/folder_closed_map.ico → src/resources/icons/folder_closed_map.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
0
resources/icons/folder_image.ico → src/resources/icons/folder_image.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/folder_map.ico → src/resources/icons/folder_map.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
0
resources/icons/image.ico → src/resources/icons/image.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
0
resources/icons/map.ico → src/resources/icons/map.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
0
resources/icons/pencil.ico → src/resources/icons/pencil.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
Before (image error) Size: 4.2 KiB After (image error) Size: 4.2 KiB |
0
resources/icons/pipette.ico → src/resources/icons/pipette.ico
Executable file → Normal file
Before (image error) Size: 1.1 KiB After (image error) Size: 1.1 KiB |
Before (image error) Size: 4.2 KiB After (image error) Size: 4.2 KiB |
Before (image error) Size: 2.4 KiB After (image error) Size: 2.4 KiB |
Before (image error) Size: 10 KiB After (image error) Size: 10 KiB |
Before (image error) Size: 4.2 KiB After (image error) Size: 4.2 KiB |
0
resources/icons/viewsprites.ico → src/resources/icons/viewsprites.ico
Executable file → Normal file
Before (image error) Size: 5.3 KiB After (image error) Size: 5.3 KiB |
54
resources/images.qrc → src/resources/images.qrc
Executable file → Normal file
|
@ -1,27 +1,27 @@
|
||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>icons/folder.ico</file>
|
<file>icons/folder.ico</file>
|
||||||
<file>icons/folder_closed.ico</file>
|
<file>icons/folder_closed.ico</file>
|
||||||
<file>icons/folder_closed_map.ico</file>
|
<file>icons/folder_closed_map.ico</file>
|
||||||
<file>icons/folder_image.ico</file>
|
<file>icons/folder_image.ico</file>
|
||||||
<file>icons/folder_map.ico</file>
|
<file>icons/folder_map.ico</file>
|
||||||
<file>icons/image.ico</file>
|
<file>icons/image.ico</file>
|
||||||
<file>icons/map.ico</file>
|
<file>icons/map.ico</file>
|
||||||
<file>icons/cursor.ico</file>
|
<file>icons/cursor.ico</file>
|
||||||
<file>icons/fill_color.ico</file>
|
<file>icons/fill_color.ico</file>
|
||||||
<file>icons/move.ico</file>
|
<file>icons/move.ico</file>
|
||||||
<file>icons/pencil.ico</file>
|
<file>icons/pencil.ico</file>
|
||||||
<file>icons/pipette.ico</file>
|
<file>icons/pipette.ico</file>
|
||||||
<file>images/Entities_16x16.png</file>
|
<file>images/Entities_16x16.png</file>
|
||||||
<file>icons/add.ico</file>
|
<file>icons/add.ico</file>
|
||||||
<file>icons/delete.ico</file>
|
<file>icons/delete.ico</file>
|
||||||
<file>icons/viewsprites.ico</file>
|
<file>icons/viewsprites.ico</file>
|
||||||
<file>images/collisions.png</file>
|
<file>images/collisions.png</file>
|
||||||
<file>icons/fill_color_cursor.ico</file>
|
<file>icons/fill_color_cursor.ico</file>
|
||||||
<file>icons/pencil_cursor.ico</file>
|
<file>icons/pencil_cursor.ico</file>
|
||||||
<file>icons/pipette_cursor.ico</file>
|
<file>icons/pipette_cursor.ico</file>
|
||||||
<file>icons/shift.ico</file>
|
<file>icons/shift.ico</file>
|
||||||
<file>icons/shift_cursor.ico</file>
|
<file>icons/shift_cursor.ico</file>
|
||||||
<file>icons/porymap-icon-1.ico</file>
|
<file>icons/porymap-icon-1.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
0
resources/images/Entities_16x16.png → src/resources/images/Entities_16x16.png
Executable file → Normal file
Before ![]() (image error) Size: 490 B After ![]() (image error) Size: 490 B ![]() ![]() |
Before ![]() (image error) Size: 2 KiB After ![]() (image error) Size: 2 KiB ![]() ![]() |