Added config file for game setup

main
Isabell Pflug 1 year ago
parent 5b183e397c
commit 55125b7dd2

@ -1,6 +1,22 @@
#include "mainwindow.h"
#include <iostream>
#include <QApplication>
#include <QDir>
#include <QSettings>
#include <QStandardPaths>
std::unique_ptr<QSettings> settings;
void find_config() {
QString config_string = QStandardPaths::locate( QStandardPaths::ConfigLocation, "ThinkPink.ini");
if (config_string == "") {
config_string = QDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation)).filePath("ThinkPink.ini");
std::cout << "No config file found. Creating default config at " << config_string.toStdString();
}
settings.reset( new QSettings( ) );
}
int main(int argc, char *argv[])
{

@ -1,3 +1,5 @@
#include <boost/json.hpp>
#include "mainwindow.h"
#include "ui_mainwindow.h"

@ -14,7 +14,22 @@
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget"/>
<widget class="QMenuBar" name="menubar"/>
<widget class="QMenuBar" name="menubar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>26</height>
</rect>
</property>
<widget class="QMenu" name="menuThinkPink">
<property name="title">
<string>ThinkPink</string>
</property>
</widget>
<addaction name="menuThinkPink"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
</widget>
<resources/>

@ -0,0 +1,7 @@
[size]
columns = 9
rows = 9
[colors]
colors = 0xBD005E, 0xFFC0CB, 0xDB7093, 0xF7A8B8
;, 0xDB7093
Loading…
Cancel
Save