Remove region map dimensions from config
This commit is contained in:
parent
089e214d2e
commit
856624addf
3 changed files with 0 additions and 26 deletions
|
@ -30,7 +30,6 @@ determined by this file.
|
||||||
``show_player_view``, 0, global, yes, Display a rectangle for the GBA screen radius
|
``show_player_view``, 0, global, yes, Display a rectangle for the GBA screen radius
|
||||||
``show_cursor_tile``, 0, global, yes, Display a rectangle around the hovered metatile(s)
|
``show_cursor_tile``, 0, global, yes, Display a rectangle around the hovered metatile(s)
|
||||||
``monitor_files``, 1, global, yes, Whether porymap will monitor changes to project files
|
``monitor_files``, 1, global, yes, Whether porymap will monitor changes to project files
|
||||||
``region_map_dimensions``, 32x20, global, yes, The dimensions of the region map tilemap
|
|
||||||
``theme``, default, global, yes, The color theme for porymap windows and widgets
|
``theme``, default, global, yes, The color theme for porymap windows and widgets
|
||||||
``text_editor_goto_line``, , global, yes, The command that will be executed when clicking the button next the ``Script`` combo-box.
|
``text_editor_goto_line``, , global, yes, The command that will be executed when clicking the button next the ``Script`` combo-box.
|
||||||
``text_editor_open_directory``, , global, yes, The command that will be executed when clicking ``Open Project in Text Editor``.
|
``text_editor_open_directory``, , global, yes, The command that will be executed when clicking ``Open Project in Text Editor``.
|
||||||
|
|
|
@ -54,7 +54,6 @@ public:
|
||||||
this->showBorder = true;
|
this->showBorder = true;
|
||||||
this->showGrid = false;
|
this->showGrid = false;
|
||||||
this->monitorFiles = true;
|
this->monitorFiles = true;
|
||||||
this->regionMapDimensions = QSize(32, 20);
|
|
||||||
this->theme = "default";
|
this->theme = "default";
|
||||||
this->textEditorOpenFolder = "";
|
this->textEditorOpenFolder = "";
|
||||||
this->textEditorGotoLine = "";
|
this->textEditorGotoLine = "";
|
||||||
|
@ -74,7 +73,6 @@ public:
|
||||||
void setShowBorder(bool enabled);
|
void setShowBorder(bool enabled);
|
||||||
void setShowGrid(bool enabled);
|
void setShowGrid(bool enabled);
|
||||||
void setMonitorFiles(bool monitor);
|
void setMonitorFiles(bool monitor);
|
||||||
void setRegionMapDimensions(int width, int height);
|
|
||||||
void setTheme(QString theme);
|
void setTheme(QString theme);
|
||||||
void setTextEditorOpenFolder(const QString &command);
|
void setTextEditorOpenFolder(const QString &command);
|
||||||
void setTextEditorGotoLine(const QString &command);
|
void setTextEditorGotoLine(const QString &command);
|
||||||
|
@ -93,7 +91,6 @@ public:
|
||||||
bool getShowBorder();
|
bool getShowBorder();
|
||||||
bool getShowGrid();
|
bool getShowGrid();
|
||||||
bool getMonitorFiles();
|
bool getMonitorFiles();
|
||||||
QSize getRegionMapDimensions();
|
|
||||||
QString getTheme();
|
QString getTheme();
|
||||||
QString getTextEditorOpenFolder();
|
QString getTextEditorOpenFolder();
|
||||||
QString getTextEditorGotoLine();
|
QString getTextEditorGotoLine();
|
||||||
|
@ -128,7 +125,6 @@ private:
|
||||||
bool showBorder;
|
bool showBorder;
|
||||||
bool showGrid;
|
bool showGrid;
|
||||||
bool monitorFiles;
|
bool monitorFiles;
|
||||||
QSize regionMapDimensions;
|
|
||||||
QString theme;
|
QString theme;
|
||||||
QString textEditorOpenFolder;
|
QString textEditorOpenFolder;
|
||||||
QString textEditorGotoLine;
|
QString textEditorGotoLine;
|
||||||
|
|
|
@ -174,17 +174,6 @@ void PorymapConfig::parseConfigKeyValue(QString key, QString value) {
|
||||||
this->showGrid = getConfigBool(key, value);
|
this->showGrid = getConfigBool(key, value);
|
||||||
} else if (key == "monitor_files") {
|
} else if (key == "monitor_files") {
|
||||||
this->monitorFiles = getConfigBool(key, value);
|
this->monitorFiles = getConfigBool(key, value);
|
||||||
} else if (key == "region_map_dimensions") {
|
|
||||||
bool ok1, ok2;
|
|
||||||
QStringList dims = value.split("x");
|
|
||||||
int w = dims[0].toInt(&ok1);
|
|
||||||
int h = dims[1].toInt(&ok2);
|
|
||||||
if (!ok1 || !ok2) {
|
|
||||||
logWarn("Cannot parse region map dimensions. Using default values instead.");
|
|
||||||
this->regionMapDimensions = QSize(32, 20);
|
|
||||||
} else {
|
|
||||||
this->regionMapDimensions = QSize(w, h);
|
|
||||||
}
|
|
||||||
} else if (key == "theme") {
|
} else if (key == "theme") {
|
||||||
this->theme = value;
|
this->theme = value;
|
||||||
} else if (key == "text_editor_open_directory") {
|
} else if (key == "text_editor_open_directory") {
|
||||||
|
@ -219,8 +208,6 @@ QMap<QString, QString> PorymapConfig::getKeyValueMap() {
|
||||||
map.insert("show_border", this->showBorder ? "1" : "0");
|
map.insert("show_border", this->showBorder ? "1" : "0");
|
||||||
map.insert("show_grid", this->showGrid ? "1" : "0");
|
map.insert("show_grid", this->showGrid ? "1" : "0");
|
||||||
map.insert("monitor_files", this->monitorFiles ? "1" : "0");
|
map.insert("monitor_files", this->monitorFiles ? "1" : "0");
|
||||||
map.insert("region_map_dimensions", QString("%1x%2").arg(this->regionMapDimensions.width())
|
|
||||||
.arg(this->regionMapDimensions.height()));
|
|
||||||
map.insert("theme", this->theme);
|
map.insert("theme", this->theme);
|
||||||
map.insert("text_editor_open_directory", this->textEditorOpenFolder);
|
map.insert("text_editor_open_directory", this->textEditorOpenFolder);
|
||||||
map.insert("text_editor_goto_line", this->textEditorGotoLine);
|
map.insert("text_editor_goto_line", this->textEditorGotoLine);
|
||||||
|
@ -326,10 +313,6 @@ void PorymapConfig::setShowGrid(bool enabled) {
|
||||||
this->save();
|
this->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PorymapConfig::setRegionMapDimensions(int width, int height) {
|
|
||||||
this->regionMapDimensions = QSize(width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PorymapConfig::setTheme(QString theme) {
|
void PorymapConfig::setTheme(QString theme) {
|
||||||
this->theme = theme;
|
this->theme = theme;
|
||||||
}
|
}
|
||||||
|
@ -426,10 +409,6 @@ bool PorymapConfig::getMonitorFiles() {
|
||||||
return this->monitorFiles;
|
return this->monitorFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
QSize PorymapConfig::getRegionMapDimensions() {
|
|
||||||
return this->regionMapDimensions;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString PorymapConfig::getTheme() {
|
QString PorymapConfig::getTheme() {
|
||||||
return this->theme;
|
return this->theme;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue