mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Finish config tool rewrite
This commit is contained in:
parent
8545c437ba
commit
6172c49ce1
@ -130,6 +130,9 @@ bool CMainDialog::OnInitDialog()
|
||||
driver_i += 1;
|
||||
}
|
||||
m_ui->devicesList->setCurrentRow(selected);
|
||||
|
||||
m_ui->maxLoDSlider->setValue((int)currentConfigApp->m_max_lod * 10);
|
||||
m_ui->maxActorsSlider->setValue(currentConfigApp->m_max_actors);
|
||||
UpdateInterface();
|
||||
return true;
|
||||
}
|
||||
@ -353,9 +356,12 @@ void CMainDialog::SelectDiskPathDialog()
|
||||
disk_path,
|
||||
QFileDialog::ShowDirsOnly
|
||||
| QFileDialog::DontResolveSymlinks);
|
||||
currentConfigApp->m_base_path = disk_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
|
||||
if (disk_path.toStdString() != "") {
|
||||
currentConfigApp->m_base_path = disk_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
}
|
||||
|
||||
void CMainDialog::SelectCDPathDialog()
|
||||
@ -365,9 +371,12 @@ void CMainDialog::SelectCDPathDialog()
|
||||
cd_path,
|
||||
QFileDialog::ShowDirsOnly
|
||||
| QFileDialog::DontResolveSymlinks);
|
||||
currentConfigApp->m_cd_path = cd_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
|
||||
if (cd_path.toStdString() != "") {
|
||||
currentConfigApp->m_cd_path = cd_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
}
|
||||
|
||||
void CMainDialog::SelectMediaPathDialog()
|
||||
@ -377,9 +386,11 @@ void CMainDialog::SelectMediaPathDialog()
|
||||
media_path,
|
||||
QFileDialog::ShowDirsOnly
|
||||
| QFileDialog::DontResolveSymlinks);
|
||||
currentConfigApp->m_media_path = media_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
if (media_path.toStdString() != "") {
|
||||
currentConfigApp->m_media_path = media_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
}
|
||||
|
||||
void CMainDialog::SelectSavePathDialog()
|
||||
@ -389,34 +400,37 @@ void CMainDialog::SelectSavePathDialog()
|
||||
save_path,
|
||||
QFileDialog::ShowDirsOnly
|
||||
| QFileDialog::DontResolveSymlinks);
|
||||
currentConfigApp->m_save_path = save_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
|
||||
if (save_path.toStdString() != "") {
|
||||
currentConfigApp->m_save_path = save_path.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CMainDialog::DiskPathEdited(QString &text)
|
||||
void CMainDialog::DiskPathEdited(const QString &text)
|
||||
{
|
||||
currentConfigApp->m_base_path = text.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::CDPathEdited(QString &text)
|
||||
void CMainDialog::CDPathEdited(const QString &text)
|
||||
{
|
||||
currentConfigApp->m_cd_path = text.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::MediaPathEdited(QString &text)
|
||||
void CMainDialog::MediaPathEdited(const QString &text)
|
||||
{
|
||||
currentConfigApp->m_media_path = text.toStdString();
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::SavePathEdited(QString &text)
|
||||
void CMainDialog::SavePathEdited(const QString &text)
|
||||
{
|
||||
currentConfigApp->m_save_path = text.toStdString();
|
||||
m_modified = true;
|
||||
|
||||
@ -51,10 +51,10 @@ private slots:
|
||||
void SelectCDPathDialog();
|
||||
void SelectMediaPathDialog();
|
||||
void SelectSavePathDialog();
|
||||
void DiskPathEdited(QString &text);
|
||||
void CDPathEdited(QString &text);
|
||||
void MediaPathEdited(QString &text);
|
||||
void SavePathEdited(QString &text);
|
||||
void DiskPathEdited(const QString &text);
|
||||
void CDPathEdited(const QString &text);
|
||||
void MediaPathEdited(const QString &text);
|
||||
void SavePathEdited(const QString &text);
|
||||
void MaxLoDChanged(int value);
|
||||
void MaxActorsChanged(int value);
|
||||
};
|
||||
|
||||
@ -321,7 +321,7 @@ void CConfigApp::WriteRegisterSettings() const
|
||||
SetIniInt(dict, "isle:Island Quality", m_model_quality);
|
||||
SetIniInt(dict, "isle:Island Texture", m_texture_quality);
|
||||
|
||||
iniparser_set(dict, "isle:Max LOD", (const char)m_max_lod);
|
||||
iniparser_set(dict, "isle:Max LOD", std::to_string(m_max_lod).c_str());
|
||||
SetIniInt(dict, "isle:Max Allowed Extras", m_max_actors);
|
||||
|
||||
#undef SetIniBool
|
||||
|
||||
@ -318,7 +318,7 @@
|
||||
<number>35</number>
|
||||
</property>
|
||||
<property name="tracking">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -392,6 +392,9 @@
|
||||
<property name="sliderPosition">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<property name="tracking">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -614,13 +617,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="saveAs">
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelButton">
|
||||
<property name="text">
|
||||
@ -636,6 +632,33 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>diskPath</tabstop>
|
||||
<tabstop>diskPathOpen</tabstop>
|
||||
<tabstop>cdPath</tabstop>
|
||||
<tabstop>cdPathOpen</tabstop>
|
||||
<tabstop>mediaPath</tabstop>
|
||||
<tabstop>mediaPathOpen</tabstop>
|
||||
<tabstop>savePath</tabstop>
|
||||
<tabstop>savePathOpen</tabstop>
|
||||
<tabstop>textureQualityFastRadioButton</tabstop>
|
||||
<tabstop>textureQualityHighRadioButton</tabstop>
|
||||
<tabstop>modelQualityLowRadioButton</tabstop>
|
||||
<tabstop>modelQualityMediumRadioButton</tabstop>
|
||||
<tabstop>modelQualityHighRadioButton</tabstop>
|
||||
<tabstop>maxLoDSlider</tabstop>
|
||||
<tabstop>maxActorsSlider</tabstop>
|
||||
<tabstop>colorPalette256RadioButton</tabstop>
|
||||
<tabstop>colorPalette16bitRadioButton</tabstop>
|
||||
<tabstop>sound3DCheckBox</tabstop>
|
||||
<tabstop>musicCheckBox</tabstop>
|
||||
<tabstop>joystickCheckBox</tabstop>
|
||||
<tabstop>devicesList</tabstop>
|
||||
<tabstop>flipVideoMemoryPagesCheckBox</tabstop>
|
||||
<tabstop>videomemoryCheckBox</tabstop>
|
||||
<tabstop>okButton</tabstop>
|
||||
<tabstop>cancelButton</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="config.qrc"/>
|
||||
</resources>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user