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;
|
driver_i += 1;
|
||||||
}
|
}
|
||||||
m_ui->devicesList->setCurrentRow(selected);
|
m_ui->devicesList->setCurrentRow(selected);
|
||||||
|
|
||||||
|
m_ui->maxLoDSlider->setValue((int)currentConfigApp->m_max_lod * 10);
|
||||||
|
m_ui->maxActorsSlider->setValue(currentConfigApp->m_max_actors);
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -353,9 +356,12 @@ void CMainDialog::SelectDiskPathDialog()
|
|||||||
disk_path,
|
disk_path,
|
||||||
QFileDialog::ShowDirsOnly
|
QFileDialog::ShowDirsOnly
|
||||||
| QFileDialog::DontResolveSymlinks);
|
| QFileDialog::DontResolveSymlinks);
|
||||||
currentConfigApp->m_base_path = disk_path.toStdString();
|
|
||||||
m_modified = true;
|
if (disk_path.toStdString() != "") {
|
||||||
UpdateInterface();
|
currentConfigApp->m_base_path = disk_path.toStdString();
|
||||||
|
m_modified = true;
|
||||||
|
UpdateInterface();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::SelectCDPathDialog()
|
void CMainDialog::SelectCDPathDialog()
|
||||||
@ -365,9 +371,12 @@ void CMainDialog::SelectCDPathDialog()
|
|||||||
cd_path,
|
cd_path,
|
||||||
QFileDialog::ShowDirsOnly
|
QFileDialog::ShowDirsOnly
|
||||||
| QFileDialog::DontResolveSymlinks);
|
| QFileDialog::DontResolveSymlinks);
|
||||||
currentConfigApp->m_cd_path = cd_path.toStdString();
|
|
||||||
m_modified = true;
|
if (cd_path.toStdString() != "") {
|
||||||
UpdateInterface();
|
currentConfigApp->m_cd_path = cd_path.toStdString();
|
||||||
|
m_modified = true;
|
||||||
|
UpdateInterface();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::SelectMediaPathDialog()
|
void CMainDialog::SelectMediaPathDialog()
|
||||||
@ -377,9 +386,11 @@ void CMainDialog::SelectMediaPathDialog()
|
|||||||
media_path,
|
media_path,
|
||||||
QFileDialog::ShowDirsOnly
|
QFileDialog::ShowDirsOnly
|
||||||
| QFileDialog::DontResolveSymlinks);
|
| QFileDialog::DontResolveSymlinks);
|
||||||
currentConfigApp->m_media_path = media_path.toStdString();
|
if (media_path.toStdString() != "") {
|
||||||
m_modified = true;
|
currentConfigApp->m_media_path = media_path.toStdString();
|
||||||
UpdateInterface();
|
m_modified = true;
|
||||||
|
UpdateInterface();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::SelectSavePathDialog()
|
void CMainDialog::SelectSavePathDialog()
|
||||||
@ -389,34 +400,37 @@ void CMainDialog::SelectSavePathDialog()
|
|||||||
save_path,
|
save_path,
|
||||||
QFileDialog::ShowDirsOnly
|
QFileDialog::ShowDirsOnly
|
||||||
| QFileDialog::DontResolveSymlinks);
|
| QFileDialog::DontResolveSymlinks);
|
||||||
currentConfigApp->m_save_path = save_path.toStdString();
|
|
||||||
m_modified = true;
|
if (save_path.toStdString() != "") {
|
||||||
UpdateInterface();
|
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();
|
currentConfigApp->m_base_path = text.toStdString();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::CDPathEdited(QString &text)
|
void CMainDialog::CDPathEdited(const QString &text)
|
||||||
{
|
{
|
||||||
currentConfigApp->m_cd_path = text.toStdString();
|
currentConfigApp->m_cd_path = text.toStdString();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::MediaPathEdited(QString &text)
|
void CMainDialog::MediaPathEdited(const QString &text)
|
||||||
{
|
{
|
||||||
currentConfigApp->m_media_path = text.toStdString();
|
currentConfigApp->m_media_path = text.toStdString();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMainDialog::SavePathEdited(QString &text)
|
void CMainDialog::SavePathEdited(const QString &text)
|
||||||
{
|
{
|
||||||
currentConfigApp->m_save_path = text.toStdString();
|
currentConfigApp->m_save_path = text.toStdString();
|
||||||
m_modified = true;
|
m_modified = true;
|
||||||
|
|||||||
@ -51,10 +51,10 @@ private slots:
|
|||||||
void SelectCDPathDialog();
|
void SelectCDPathDialog();
|
||||||
void SelectMediaPathDialog();
|
void SelectMediaPathDialog();
|
||||||
void SelectSavePathDialog();
|
void SelectSavePathDialog();
|
||||||
void DiskPathEdited(QString &text);
|
void DiskPathEdited(const QString &text);
|
||||||
void CDPathEdited(QString &text);
|
void CDPathEdited(const QString &text);
|
||||||
void MediaPathEdited(QString &text);
|
void MediaPathEdited(const QString &text);
|
||||||
void SavePathEdited(QString &text);
|
void SavePathEdited(const QString &text);
|
||||||
void MaxLoDChanged(int value);
|
void MaxLoDChanged(int value);
|
||||||
void MaxActorsChanged(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 Quality", m_model_quality);
|
||||||
SetIniInt(dict, "isle:Island Texture", m_texture_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);
|
SetIniInt(dict, "isle:Max Allowed Extras", m_max_actors);
|
||||||
|
|
||||||
#undef SetIniBool
|
#undef SetIniBool
|
||||||
|
|||||||
@ -318,7 +318,7 @@
|
|||||||
<number>35</number>
|
<number>35</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="tracking">
|
<property name="tracking">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -392,6 +392,9 @@
|
|||||||
<property name="sliderPosition">
|
<property name="sliderPosition">
|
||||||
<number>20</number>
|
<number>20</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="tracking">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -614,13 +617,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="saveAs">
|
|
||||||
<property name="text">
|
|
||||||
<string>PushButton</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cancelButton">
|
<widget class="QPushButton" name="cancelButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -636,6 +632,33 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</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>
|
<resources>
|
||||||
<include location="config.qrc"/>
|
<include location="config.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user