commit
6d19da8d88
12 changed files with 198 additions and 15 deletions
|
@ -1484,9 +1484,15 @@ void MapPixmapItem::updateCurHoveredTile(QPointF pos) {
|
||||||
|
|
||||||
void MapPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) {
|
void MapPixmapItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) {
|
||||||
updateCurHoveredTile(event->pos());
|
updateCurHoveredTile(event->pos());
|
||||||
|
if (editor->ui->actionBetter_Cursors->isChecked()){
|
||||||
|
setCursor(editor->cursor);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void MapPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) {
|
void MapPixmapItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) {
|
||||||
map->clearHoveredTile();
|
map->clearHoveredTile();
|
||||||
|
if (editor->ui->actionBetter_Cursors->isChecked()){
|
||||||
|
unsetCursor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void MapPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
void MapPixmapItem::mousePressEvent(QGraphicsSceneMouseEvent *event) {
|
||||||
QPointF pos = event->pos();
|
QPointF pos = event->pos();
|
||||||
|
|
3
editor.h
3
editor.h
|
@ -7,6 +7,7 @@
|
||||||
#include <QGraphicsItemAnimation>
|
#include <QGraphicsItemAnimation>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
#include <QCursor>
|
||||||
|
|
||||||
#include "project.h"
|
#include "project.h"
|
||||||
#include "ui_mainwindow.h"
|
#include "ui_mainwindow.h"
|
||||||
|
@ -108,6 +109,8 @@ public:
|
||||||
QList<int> *copiedMetatileSelection = new QList<int>;
|
QList<int> *copiedMetatileSelection = new QList<int>;
|
||||||
|
|
||||||
QString map_edit_mode;
|
QString map_edit_mode;
|
||||||
|
QString prev_edit_mode;
|
||||||
|
QCursor cursor;
|
||||||
|
|
||||||
void objectsView_onMousePress(QMouseEvent *event);
|
void objectsView_onMousePress(QMouseEvent *event);
|
||||||
void objectsView_onMouseMove(QMouseEvent *event);
|
void objectsView_onMouseMove(QMouseEvent *event);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
#include <QScroller>
|
||||||
|
#include <math.h>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
@ -35,6 +37,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
connect(ui->newEventToolButton, SIGNAL(newEventAdded(QString)), this, SLOT(addNewEvent(QString)));
|
connect(ui->newEventToolButton, SIGNAL(newEventAdded(QString)), this, SLOT(addNewEvent(QString)));
|
||||||
|
|
||||||
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z), this, SLOT(redo()));
|
new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z), this, SLOT(redo()));
|
||||||
|
new QShortcut(Qt::Key_M, this, SLOT(toggleEditModeMove()));
|
||||||
|
|
||||||
editor = new Editor(ui);
|
editor = new Editor(ui);
|
||||||
connect(editor, SIGNAL(objectsChanged()), this, SLOT(updateSelectedObjects()));
|
connect(editor, SIGNAL(objectsChanged()), this, SLOT(updateSelectedObjects()));
|
||||||
|
@ -55,6 +58,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
openProject(default_dir);
|
openProject(default_dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.contains("cursor_mode") && settings.value("cursor_mode") == "0") {
|
||||||
|
ui->actionBetter_Cursors->setChecked(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -599,6 +606,36 @@ void MainWindow::on_actionRedo_triggered()
|
||||||
redo();
|
redo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionZoom_In_triggered() {
|
||||||
|
scaleMapView(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionZoom_Out_triggered() {
|
||||||
|
scaleMapView(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionBetter_Cursors_triggered() {
|
||||||
|
QSettings settings;
|
||||||
|
settings.setValue("cursor_mode", QString::number(ui->actionBetter_Cursors->isChecked()));
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::scaleMapView(int s) {
|
||||||
|
editor->map->scale_exp += s;
|
||||||
|
|
||||||
|
double base = (double)editor->map->scale_base;
|
||||||
|
double exp = editor->map->scale_exp;
|
||||||
|
double sfactor = pow(base,s);
|
||||||
|
|
||||||
|
ui->graphicsView_Map->scale(sfactor,sfactor);
|
||||||
|
ui->graphicsView_Objects_Map->scale(sfactor,sfactor);
|
||||||
|
|
||||||
|
ui->graphicsView_Map->setFixedSize((editor->scene->width() + 2) * pow(base,exp),
|
||||||
|
(editor->scene->height() + 2) * pow(base,exp));
|
||||||
|
|
||||||
|
ui->graphicsView_Objects_Map->setFixedSize((editor->scene->width() + 2) * pow(base,exp),
|
||||||
|
(editor->scene->height() + 2) * pow(base,exp));
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::addNewEvent(QString event_type)
|
void MainWindow::addNewEvent(QString event_type)
|
||||||
{
|
{
|
||||||
if (editor) {
|
if (editor) {
|
||||||
|
@ -899,24 +936,60 @@ void MainWindow::on_toolButton_Open_Scripts_clicked()
|
||||||
void MainWindow::on_toolButton_Paint_clicked()
|
void MainWindow::on_toolButton_Paint_clicked()
|
||||||
{
|
{
|
||||||
editor->map_edit_mode = "paint";
|
editor->map_edit_mode = "paint";
|
||||||
|
editor->cursor = QCursor(QPixmap(":/icons/pencil_cursor.ico"), 10, 10);
|
||||||
|
|
||||||
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
QScroller::ungrabGesture(ui->scrollArea);
|
||||||
|
|
||||||
checkToolButtons();
|
checkToolButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_toolButton_Select_clicked()
|
void MainWindow::on_toolButton_Select_clicked()
|
||||||
{
|
{
|
||||||
editor->map_edit_mode = "select";
|
editor->map_edit_mode = "select";
|
||||||
|
editor->cursor = QCursor(QPixmap(":/icons/cursor.ico"), 0, 0);
|
||||||
|
|
||||||
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
QScroller::ungrabGesture(ui->scrollArea);
|
||||||
|
|
||||||
checkToolButtons();
|
checkToolButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_toolButton_Fill_clicked()
|
void MainWindow::on_toolButton_Fill_clicked()
|
||||||
{
|
{
|
||||||
editor->map_edit_mode = "fill";
|
editor->map_edit_mode = "fill";
|
||||||
|
editor->cursor = QCursor(QPixmap(":/icons/fill_color_cursor.ico"), 10, 10);
|
||||||
|
|
||||||
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
QScroller::ungrabGesture(ui->scrollArea);
|
||||||
|
|
||||||
checkToolButtons();
|
checkToolButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_toolButton_Dropper_clicked()
|
void MainWindow::on_toolButton_Dropper_clicked()
|
||||||
{
|
{
|
||||||
editor->map_edit_mode = "pick";
|
editor->map_edit_mode = "pick";
|
||||||
|
editor->cursor = QCursor(QPixmap(":/icons/pipette_cursor.ico"), 10, 10);
|
||||||
|
|
||||||
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
|
||||||
|
QScroller::ungrabGesture(ui->scrollArea);
|
||||||
|
|
||||||
|
checkToolButtons();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_toolButton_Move_clicked()
|
||||||
|
{
|
||||||
|
editor->map_edit_mode = "move";
|
||||||
|
editor->cursor = QCursor(QPixmap(":/icons/move.ico"), 7, 7);
|
||||||
|
|
||||||
|
ui->scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
ui->scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
QScroller::grabGesture(ui->scrollArea, QScroller::LeftMouseButtonGesture);
|
||||||
|
|
||||||
checkToolButtons();
|
checkToolButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -925,6 +998,25 @@ void MainWindow::checkToolButtons() {
|
||||||
ui->toolButton_Select->setChecked(editor->map_edit_mode == "select");
|
ui->toolButton_Select->setChecked(editor->map_edit_mode == "select");
|
||||||
ui->toolButton_Fill->setChecked(editor->map_edit_mode == "fill");
|
ui->toolButton_Fill->setChecked(editor->map_edit_mode == "fill");
|
||||||
ui->toolButton_Dropper->setChecked(editor->map_edit_mode == "pick");
|
ui->toolButton_Dropper->setChecked(editor->map_edit_mode == "pick");
|
||||||
|
ui->toolButton_Move->setChecked(editor->map_edit_mode == "move");
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::toggleEditModeMove() {
|
||||||
|
if (editor->map_edit_mode == "move") {
|
||||||
|
if (editor->prev_edit_mode == "paint") {
|
||||||
|
on_toolButton_Paint_clicked();
|
||||||
|
} else if (editor->prev_edit_mode == "fill") {
|
||||||
|
on_toolButton_Fill_clicked();
|
||||||
|
} else if (editor->prev_edit_mode == "pick") {
|
||||||
|
on_toolButton_Dropper_clicked();
|
||||||
|
} else if (editor->prev_edit_mode == "select") {
|
||||||
|
on_toolButton_Select_clicked();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
editor->prev_edit_mode = editor->map_edit_mode;
|
||||||
|
on_toolButton_Move_clicked();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onLoadMapRequested(QString mapName, QString fromMapName) {
|
void MainWindow::onLoadMapRequested(QString mapName, QString fromMapName) {
|
||||||
|
|
|
@ -37,6 +37,7 @@ private slots:
|
||||||
void undo();
|
void undo();
|
||||||
void redo();
|
void redo();
|
||||||
|
|
||||||
|
void toggleEditModeMove();
|
||||||
void openInTextEditor();
|
void openInTextEditor();
|
||||||
|
|
||||||
void onLoadMapRequested(QString, QString);
|
void onLoadMapRequested(QString, QString);
|
||||||
|
@ -60,6 +61,10 @@ private slots:
|
||||||
|
|
||||||
void on_actionRedo_triggered();
|
void on_actionRedo_triggered();
|
||||||
|
|
||||||
|
void on_actionZoom_In_triggered();
|
||||||
|
void on_actionZoom_Out_triggered();
|
||||||
|
void on_actionBetter_Cursors_triggered();
|
||||||
|
|
||||||
void on_toolButton_deleteObject_clicked();
|
void on_toolButton_deleteObject_clicked();
|
||||||
void on_toolButton_Open_Scripts_clicked();
|
void on_toolButton_Open_Scripts_clicked();
|
||||||
|
|
||||||
|
@ -74,6 +79,8 @@ private slots:
|
||||||
|
|
||||||
void on_toolButton_Dropper_clicked();
|
void on_toolButton_Dropper_clicked();
|
||||||
|
|
||||||
|
void on_toolButton_Move_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);
|
||||||
|
@ -127,6 +134,8 @@ private:
|
||||||
|
|
||||||
void displayMapProperties();
|
void displayMapProperties();
|
||||||
void checkToolButtons();
|
void checkToolButtons();
|
||||||
|
|
||||||
|
void scaleMapView(int);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MapListUserRoles {
|
enum MapListUserRoles {
|
||||||
|
|
|
@ -245,6 +245,23 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QToolButton" name="toolButton_Move">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Move</p><p>Click to drag map around.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="resources/images.qrc">
|
||||||
|
<normaloff>:/icons/move.ico</normaloff>:/icons/move.ico</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBox_smartPaths">
|
<widget class="QCheckBox" name="checkBox_smartPaths">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
|
@ -334,8 +351,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>462</width>
|
<width>429</width>
|
||||||
<height>599</height>
|
<height>620</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_8">
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
|
@ -362,9 +379,18 @@
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="mouseTracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QAbstractScrollArea::AdjustIgnored</enum>
|
||||||
|
</property>
|
||||||
|
<property name="dragMode">
|
||||||
|
<enum>QGraphicsView::NoDrag</enum>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
|
@ -708,7 +734,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>252</width>
|
<width>315</width>
|
||||||
<height>86</height>
|
<height>86</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -812,10 +838,10 @@
|
||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>8</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>323</width>
|
<width>365</width>
|
||||||
<height>368</height>
|
<height>405</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -1050,8 +1076,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>371</width>
|
<width>381</width>
|
||||||
<height>643</height>
|
<height>657</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_7">
|
<layout class="QGridLayout" name="gridLayout_7">
|
||||||
|
@ -1216,8 +1242,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>410</width>
|
<width>420</width>
|
||||||
<height>560</height>
|
<height>584</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
|
@ -1872,8 +1898,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>818</width>
|
<width>826</width>
|
||||||
<height>539</height>
|
<height>557</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_14">
|
<layout class="QGridLayout" name="gridLayout_14">
|
||||||
|
@ -2045,7 +2071,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1117</width>
|
<width>1117</width>
|
||||||
<height>22</height>
|
<height>21</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuFile">
|
<widget class="QMenu" name="menuFile">
|
||||||
|
@ -2067,8 +2093,17 @@
|
||||||
<addaction name="actionUndo"/>
|
<addaction name="actionUndo"/>
|
||||||
<addaction name="actionRedo"/>
|
<addaction name="actionRedo"/>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuView">
|
||||||
|
<property name="title">
|
||||||
|
<string>View</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionZoom_In"/>
|
||||||
|
<addaction name="actionZoom_Out"/>
|
||||||
|
<addaction name="actionBetter_Cursors"/>
|
||||||
|
</widget>
|
||||||
<addaction name="menuFile"/>
|
<addaction name="menuFile"/>
|
||||||
<addaction name="menuEdit"/>
|
<addaction name="menuEdit"/>
|
||||||
|
<addaction name="menuView"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar"/>
|
<widget class="QStatusBar" name="statusBar"/>
|
||||||
<action name="action_Save_Project">
|
<action name="action_Save_Project">
|
||||||
|
@ -2127,6 +2162,36 @@
|
||||||
<string>Export Map Image...</string>
|
<string>Export Map Image...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionZoom_In">
|
||||||
|
<property name="text">
|
||||||
|
<string>Zoom In</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>+</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionZoom_Out">
|
||||||
|
<property name="text">
|
||||||
|
<string>Zoom Out</string>
|
||||||
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>-</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionBetter_Cursors">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cursor Icons</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Use reticule-styled cursors with icon showing currently selected tool.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|
5
map.cpp
5
map.cpp
|
@ -608,10 +608,11 @@ bool Map::hasUnsavedChanges() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Map::hoveredTileChanged(int x, int y, int block) {
|
void Map::hoveredTileChanged(int x, int y, int block) {
|
||||||
emit statusBarMessage(QString("X: %1, Y: %2, Metatile: 0x%3")
|
emit statusBarMessage(QString("X: %1, Y: %2, Metatile: 0x%3, Scale = %4x")
|
||||||
.arg(x)
|
.arg(x)
|
||||||
.arg(y)
|
.arg(y)
|
||||||
.arg(QString("%1").arg(block, 3, 16, QChar('0')).toUpper()));
|
.arg(QString("%1").arg(block, 3, 16, QChar('0')).toUpper())
|
||||||
|
.arg(QString::number(pow(this->scale_base,this->scale_exp))));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Map::clearHoveredTile() {
|
void Map::clearHoveredTile() {
|
||||||
|
|
3
map.h
3
map.h
|
@ -9,6 +9,7 @@
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QGraphicsPixmapItem>
|
#include <QGraphicsPixmapItem>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
class HistoryItem {
|
class HistoryItem {
|
||||||
public:
|
public:
|
||||||
|
@ -135,6 +136,8 @@ public:
|
||||||
QString show_location;
|
QString show_location;
|
||||||
QString battle_scene;
|
QString battle_scene;
|
||||||
MapLayout *layout;
|
MapLayout *layout;
|
||||||
|
int scale_exp = 0;
|
||||||
|
double scale_base = sqrt(2); // adjust scale factor with this
|
||||||
|
|
||||||
bool isPersistedToFile = true;
|
bool isPersistedToFile = true;
|
||||||
|
|
||||||
|
|
BIN
resources/icons/fill_color_cursor.ico
Normal file
BIN
resources/icons/fill_color_cursor.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
resources/icons/move.ico
Normal file
BIN
resources/icons/move.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/icons/pencil_cursor.ico
Normal file
BIN
resources/icons/pencil_cursor.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
BIN
resources/icons/pipette_cursor.ico
Normal file
BIN
resources/icons/pipette_cursor.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -9,6 +9,7 @@
|
||||||
<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/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>
|
||||||
|
@ -16,5 +17,8 @@
|
||||||
<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/pencil_cursor.ico</file>
|
||||||
|
<file>icons/pipette_cursor.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in a new issue