1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Updated according to review

This commit is contained in:
Ivan Savenko 2023-07-03 14:30:13 +03:00
parent 5f8a125a98
commit 02f23086b6
8 changed files with 434 additions and 343 deletions

View File

@ -58,12 +58,12 @@
},
"language" : {
"type" : "string",
"enum" : [ "english", "czech", "chinese", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ],
"enum" : [ "english", "czech", "chinese", "german", "hungarian", "italian", "korean", "polish", "russian", "spanish", "ukrainian" ],
"default" : "english"
},
"gameDataLanguage" : {
"type" : "string",
"enum" : [ "auto", "english", "czech", "chinese", "german", "italian", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
"enum" : [ "auto", "english", "czech", "chinese", "german", "hungarian", "italian", "korean", "polish", "russian", "spanish", "ukrainian", "other_cp1250", "other_cp1251", "other_cp1252" ],
"default" : "auto"
},
"lastSave" : {
@ -170,6 +170,8 @@
},
"targetfps" : {
"type" : "number",
"defaultIOS" : 30, // reduce battery usage
"defaultAndroid" : 30, // reduce battery usage
"default" : 60
}
}

View File

@ -63,3 +63,15 @@ void AboutProjectView::on_pushButtonGithub_clicked()
{
QDesktopServices::openUrl(QUrl("https://github.com/vcmi/vcmi"));
}
void AboutProjectView::on_pushButtonHomepage_clicked()
{
QDesktopServices::openUrl(QUrl("https://vcmi.eu/"));
}
void AboutProjectView::on_pushButtonBugreport_clicked()
{
QDesktopServices::openUrl(QUrl("https://github.com/vcmi/vcmi/issues"));
}

View File

@ -43,6 +43,10 @@ private slots:
void on_pushButtonGithub_clicked();
void on_pushButtonHomepage_clicked();
void on_pushButtonBugreport_clicked();
private:
Ui::AboutProjectView * ui;

View File

@ -6,27 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>515</width>
<height>394</height>
<width>763</width>
<height>446</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0">
@ -259,6 +246,62 @@
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonHomepage">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Project homepage</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonBugreport">
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Report a bug</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>

View File

@ -183,19 +183,6 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="aboutButton">
<property name="sizePolicy">
@ -246,6 +233,19 @@
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="startEditorButton">
<property name="sizePolicy">

View File

@ -80,6 +80,7 @@ void CSettingsView::loadSettings()
fillValidScalingRange();
ui->spinBoxInterfaceScaling->setValue(settings["video"]["resolution"]["scaling"].Float());
ui->spinBoxFramerateLimit->setValue(settings["video"]["targetfps"].Float());
ui->comboBoxFriendlyAI->setCurrentText(QString::fromStdString(settings["server"]["friendlyAI"].String()));
ui->comboBoxNeutralAI->setCurrentText(QString::fromStdString(settings["server"]["neutralAI"].String()));
@ -485,3 +486,10 @@ void CSettingsView::on_refreshRepositoriesButton_clicked()
mainWindow->getModView()->loadRepositories();
}
void CSettingsView::on_spinBoxFramerateLimit_valueChanged(int arg1)
{
Settings node = settings.write["video"]["targetfps"];
node->Float() = arg1;
}

View File

@ -61,6 +61,8 @@ private slots:
void on_refreshRepositoriesButton_clicked();
void on_spinBoxFramerateLimit_valueChanged(int arg1);
private:
Ui::CSettingsView * ui;

View File

@ -107,66 +107,12 @@
<property name="geometry">
<rect>
<x>0</x>
<y>-301</y>
<y>-331</y>
<width>610</width>
<height>649</height>
<height>679</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="3,0,0,0,0">
<item row="14" column="0">
<widget class="QLabel" name="labelCursorType">
<property name="text">
<string>Cursor</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="labelFullScreen">
<property name="text">
<string>Fullscreen</string>
</property>
</widget>
</item>
<item row="9" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="6" column="1" colspan="4">
<widget class="QSpinBox" name="spinBoxNetworkPort">
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
</property>
</widget>
</item>
<item row="22" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelLanguage">
<property name="text">
<string>VCMI Language</string>
</property>
</widget>
</item>
<layout class="QGridLayout" name="gridLayout" columnstretch="2,0,1,1,1">
<item row="8" column="0">
<widget class="QLabel" name="labelVideo">
<property name="font">
@ -180,41 +126,24 @@
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="labelNetworkPort">
<item row="24" column="2" colspan="3">
<widget class="QLineEdit" name="lineEditRepositoryDefault">
<property name="text">
<string>Network port</string>
<string notr="true"/>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="22" column="0">
<widget class="QLabel" name="labelAutoCheck">
<property name="text">
<string>Check on startup</string>
</property>
</widget>
</item>
<item row="23" column="1">
<widget class="QCheckBox" name="checkBoxRepositoryDefault">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="18" column="1" colspan="4">
<item row="25" column="2" colspan="3">
<widget class="QLineEdit" name="lineEditRepositoryExtra">
<property name="text">
<string notr="true"/>
</property>
</widget>
</item>
<item row="19" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxNeutralAI">
<property name="currentText">
<string notr="true">BattleAI</string>
@ -231,44 +160,23 @@
</item>
</widget>
</item>
<item row="5" column="4">
<widget class="QPushButton" name="pushButtonTranslation">
<item row="6" column="0">
<widget class="QLabel" name="labelNetworkPort">
<property name="text">
<string/>
<string>Network port</string>
</property>
</widget>
</item>
<item row="17" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxAlliedPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
<item row="22" column="0">
<widget class="QLabel" name="labelRepositories">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<item>
<property name="text">
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="23" column="2" colspan="3">
<widget class="QLineEdit" name="lineEditRepositoryDefault">
<property name="text">
<string notr="true"/>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelLanguageBase">
<property name="text">
<string>Heroes III Data Language</string>
<string>Mod Repositories</string>
</property>
</widget>
</item>
@ -289,37 +197,62 @@
</item>
</widget>
</item>
<item row="24" column="2" colspan="3">
<widget class="QLineEdit" name="lineEditRepositoryExtra">
<item row="21" column="0">
<widget class="QLabel" name="labelEnemyAI">
<property name="text">
<string notr="true"/>
<string>Enemy AI in battles</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxLanguageBase"/>
</item>
<item row="19" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxFriendlyAI">
<property name="editable">
<bool>false</bool>
</property>
<item row="18" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxAlliedPlayerAI">
<property name="currentText">
<string notr="true">BattleAI</string>
<string notr="true">VCAI</string>
</property>
<item>
<property name="text">
<string notr="true">BattleAI</string>
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">StupidAI</string>
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="12" column="1" colspan="4">
<item row="5" column="0">
<widget class="QLabel" name="labelTranslation">
<property name="text">
<string>Heroes III Translation</string>
</property>
</widget>
</item>
<item row="24" column="0">
<widget class="QLabel" name="labelRepositoryDefault">
<property name="text">
<string>Default repository</string>
</property>
</widget>
</item>
<item row="23" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxAutoCheck">
<property name="currentIndex">
<number>1</number>
</property>
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>On</string>
</property>
</item>
</widget>
</item>
<item row="13" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxShowIntro">
<property name="currentIndex">
<number>1</number>
@ -336,20 +269,34 @@
</item>
</widget>
</item>
<item row="24" column="0">
<widget class="QLabel" name="labelRepositoryExtra">
<item row="5" column="4">
<widget class="QPushButton" name="pushButtonTranslation">
<property name="text">
<string>Additional repository</string>
<string/>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="labelAlliedPlayerAI">
<item row="14" column="0">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Adventure Map Allies</string>
<string>Display index</string>
</property>
</widget>
</item>
<item row="15" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxCursorType">
<item>
<property name="text">
<string>Hardware</string>
</property>
</item>
<item>
<property name="text">
<string>Software</string>
</property>
</item>
</widget>
</item>
<item row="10" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxFullScreen">
<property name="toolTip">
@ -381,7 +328,243 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
</item>
</widget>
</item>
<item row="25" column="1">
<widget class="QCheckBox" name="checkBoxRepositoryExtra">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="labelLanguage">
<property name="text">
<string>VCMI Language</string>
</property>
</widget>
</item>
<item row="6" column="1" colspan="4">
<widget class="QSpinBox" name="spinBoxNetworkPort">
<property name="minimum">
<number>1024</number>
</property>
<property name="maximum">
<number>65535</number>
</property>
<property name="value">
<number>3030</number>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="3">
<widget class="QLabel" name="labelTranslationStatus">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="20" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxFriendlyAI">
<property name="editable">
<bool>false</bool>
</property>
<property name="currentText">
<string notr="true">BattleAI</string>
</property>
<item>
<property name="text">
<string notr="true">BattleAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">StupidAI</string>
</property>
</item>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="labelNeutralAI">
<property name="text">
<string>Neutral AI in battles</string>
</property>
</widget>
</item>
<item row="9" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxResolution"/>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>General</string>
</property>
</widget>
</item>
<item row="9" column="0">
<widget class="QLabel" name="labelResolution">
<property name="text">
<string>Resolution</string>
</property>
</widget>
</item>
<item row="24" column="1">
<widget class="QCheckBox" name="checkBoxRepositoryDefault">
<property name="enabled">
<bool>true</bool>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="17" column="0">
<widget class="QLabel" name="labelEnemyPlayerAI">
<property name="text">
<string>Adventure Map Enemies</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="labelInterfaceScaling">
<property name="text">
<string>Interface Scaling</string>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="labelCursorType">
<property name="text">
<string>Cursor</string>
</property>
</widget>
</item>
<item row="11" column="1" colspan="4">
<widget class="QSpinBox" name="spinBoxInterfaceScaling">
<property name="minimum">
<number>50</number>
</property>
<property name="maximum">
<number>400</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="labelLanguageBase">
<property name="text">
<string>Heroes III Data Language</string>
</property>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="labelAlliedPlayerAI">
<property name="text">
<string>Adventure Map Allies</string>
</property>
</widget>
</item>
<item row="17" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxEnemyPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
</property>
<item>
<property name="text">
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxLanguageBase"/>
</item>
<item row="25" column="0">
<widget class="QLabel" name="labelRepositoryExtra">
<property name="text">
<string>Additional repository</string>
</property>
</widget>
</item>
<item row="23" column="0">
<widget class="QLabel" name="labelAutoCheck">
<property name="text">
<string>Check on startup</string>
</property>
</widget>
</item>
<item row="23" column="3" colspan="2">
<widget class="QPushButton" name="refreshRepositoriesButton">
<property name="text">
<string>Refresh now</string>
</property>
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="labelFriendlyAI">
<property name="text">
<string>Friendly AI in battles</string>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="labelFullScreen">
<property name="text">
<string>Fullscreen</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxLanguage"/>
</item>
<item row="14" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="7" column="0">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="labelArtificialIntelligence">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Artificial Intelligence</string>
</property>
</widget>
</item>
<item row="21" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxEnemyAI">
<property name="editable">
<bool>false</bool>
@ -401,189 +584,26 @@ Fullscreen Exclusive Mode - game will cover entirety of your screen and will use
</item>
</widget>
</item>
<item row="11" column="1" colspan="4">
<widget class="QSpinBox" name="spinBoxInterfaceScaling">
<item row="12" column="0">
<widget class="QLabel" name="labelFramerateLimit">
<property name="text">
<string>Framerate Limit</string>
</property>
</widget>
</item>
<item row="12" column="1" colspan="4">
<widget class="QSpinBox" name="spinBoxFramerateLimit">
<property name="minimum">
<number>50</number>
<number>20</number>
</property>
<property name="maximum">
<number>400</number>
<number>1000</number>
</property>
<property name="singleStep">
<number>10</number>
</property>
</widget>
</item>
<item row="15" column="0">
<widget class="QLabel" name="labelArtificialIntelligence">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Artificial Intelligence</string>
</property>
</widget>
</item>
<item row="21" column="0">
<widget class="QLabel" name="labelRepositories">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Mod Repositories</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxLanguage"/>
</item>
<item row="24" column="1">
<widget class="QCheckBox" name="checkBoxRepositoryExtra">
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="labelGeneral">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>General</string>
</property>
</widget>
</item>
<item row="13" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxDisplayIndex"/>
</item>
<item row="20" column="0">
<widget class="QLabel" name="labelEnemyAI">
<property name="text">
<string>Enemy AI in battles</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="labelInterfaceScaling">
<property name="text">
<string>Interface Scaling</string>
</property>
</widget>
</item>
<item row="13" column="0">
<widget class="QLabel" name="labelDisplayIndex">
<property name="text">
<string>Display index</string>
</property>
</widget>
</item>
<item row="5" column="1" colspan="3">
<widget class="QLabel" name="labelTranslationStatus">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="14" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxCursorType">
<item>
<property name="text">
<string>Hardware</string>
</property>
</item>
<item>
<property name="text">
<string>Software</string>
</property>
</item>
</widget>
</item>
<item row="18" column="0">
<widget class="QLabel" name="labelNeutralAI">
<property name="text">
<string>Neutral AI in battles</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="labelTranslation">
<property name="text">
<string>Heroes III Translation</string>
</property>
</widget>
</item>
<item row="19" column="0">
<widget class="QLabel" name="labelFriendlyAI">
<property name="text">
<string>Friendly AI in battles</string>
</property>
</widget>
</item>
<item row="22" column="3" colspan="2">
<widget class="QPushButton" name="refreshRepositoriesButton">
<property name="text">
<string>Refresh now</string>
</property>
</widget>
</item>
<item row="23" column="0">
<widget class="QLabel" name="labelRepositoryDefault">
<property name="text">
<string>Default repository</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="labelAutoSave">
<property name="text">
<string>Autosave</string>
</property>
</widget>
</item>
<item row="16" column="1" colspan="4">
<widget class="QComboBox" name="comboBoxEnemyPlayerAI">
<property name="currentText">
<string notr="true">VCAI</string>
</property>
<item>
<property name="text">
<string notr="true">VCAI</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">Nullkiller</string>
</property>
</item>
</widget>
</item>
<item row="12" column="0">
<widget class="QLabel" name="labelShowIntro">
<property name="text">
<string>Show intro</string>
</property>
</widget>
</item>
<item row="16" column="0">
<widget class="QLabel" name="labelEnemyPlayerAI">
<property name="text">
<string>Adventure Map Enemies</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>