Add styles to grid settings

This commit is contained in:
GriffinR
2024-09-27 22:19:52 -04:00
parent 16536eb940
commit 2cd4cb9334
6 changed files with 113 additions and 48 deletions

View File

@@ -23,7 +23,6 @@
#include "collisionpixmapitem.h"
#include "mappixmapitem.h"
#include "settings.h"
#include "gridsettingsdialog.h"
#include "movablerect.h"
#include "cursortilerect.h"
#include "mapruler.h"

View File

@@ -4,6 +4,15 @@
#include <QCursor>
struct GridSettings {
uint width = 16;
uint height = 16;
int offsetX = 0;
int offsetY = 0;
Qt::PenStyle style = Qt::SolidLine;
QColor color = Qt::black;
};
class Settings
{
public:

View File

@@ -4,20 +4,12 @@
#include <QDialog>
#include <QAbstractButton>
#include "settings.h"
namespace Ui {
class GridSettingsDialog;
}
struct GridSettings {
uint width = 16;
uint height = 16;
int offsetX = 0;
int offsetY = 0;
QString style;
QColor color;
};
class GridSettingsDialog : public QDialog
{
Q_OBJECT
@@ -41,7 +33,7 @@ private slots:
void on_spinBox_Height_valueChanged(int value);
void on_spinBox_X_valueChanged(int value);
void on_spinBox_Y_valueChanged(int value);
void on_comboBox_Style_currentTextChanged(QString style);
void on_comboBox_Style_currentIndexChanged(int index);
};
inline bool operator==(const struct GridSettings &a, const struct GridSettings &b) {