mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Add Launch Game option to config tool
This commit is contained in:
parent
7797729a3f
commit
e2c30fcd8e
@ -11,6 +11,7 @@
|
|||||||
#include "res/resource.h"
|
#include "res/resource.h"
|
||||||
|
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
#include <QProcess>
|
||||||
#include <mxdirectx/legodxinfo.h>
|
#include <mxdirectx/legodxinfo.h>
|
||||||
#include <ui_maindialog.h>
|
#include <ui_maindialog.h>
|
||||||
|
|
||||||
@ -59,6 +60,7 @@ CMainDialog::CMainDialog(QWidget* pParent) : QDialog(pParent)
|
|||||||
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
||||||
connect(m_ui->okButton, &QPushButton::clicked, this, &CMainDialog::accept);
|
connect(m_ui->okButton, &QPushButton::clicked, this, &CMainDialog::accept);
|
||||||
connect(m_ui->cancelButton, &QPushButton::clicked, this, &CMainDialog::reject);
|
connect(m_ui->cancelButton, &QPushButton::clicked, this, &CMainDialog::reject);
|
||||||
|
connect(m_ui->launchButton, &QPushButton::clicked, this, &CMainDialog::launch);
|
||||||
|
|
||||||
connect(m_ui->dataPathOpen, &QPushButton::clicked, this, &CMainDialog::SelectDataPathDialog);
|
connect(m_ui->dataPathOpen, &QPushButton::clicked, this, &CMainDialog::SelectDataPathDialog);
|
||||||
connect(m_ui->savePathOpen, &QPushButton::clicked, this, &CMainDialog::SelectSavePathDialog);
|
connect(m_ui->savePathOpen, &QPushButton::clicked, this, &CMainDialog::SelectSavePathDialog);
|
||||||
@ -155,6 +157,20 @@ void CMainDialog::accept()
|
|||||||
QDialog::accept();
|
QDialog::accept();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMainDialog::launch()
|
||||||
|
{
|
||||||
|
if (m_modified) {
|
||||||
|
currentConfigApp->WriteRegisterSettings();
|
||||||
|
}
|
||||||
|
QDir::setCurrent(QCoreApplication::applicationDirPath());
|
||||||
|
#ifdef _WIN32
|
||||||
|
QProcess::startDetached("./isle.exe");
|
||||||
|
#else
|
||||||
|
QProcess::startDetached("./isle");
|
||||||
|
#endif
|
||||||
|
QDialog::accept();
|
||||||
|
}
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x00404360
|
// FUNCTION: CONFIG 0x00404360
|
||||||
void CMainDialog::UpdateInterface()
|
void CMainDialog::UpdateInterface()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,6 +45,7 @@ private slots:
|
|||||||
void OnCheckboxFullscreen(bool checked);
|
void OnCheckboxFullscreen(bool checked);
|
||||||
void accept() override;
|
void accept() override;
|
||||||
void reject() override;
|
void reject() override;
|
||||||
|
void launch();
|
||||||
void SelectDataPathDialog();
|
void SelectDataPathDialog();
|
||||||
void SelectSavePathDialog();
|
void SelectSavePathDialog();
|
||||||
void DataPathEdited();
|
void DataPathEdited();
|
||||||
|
|||||||
@ -509,17 +509,24 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="okButton">
|
<widget class="QPushButton" name="okButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OK</string>
|
<string>Save and Exit</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="default">
|
<property name="default">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="launchButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Launch Game</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="cancelButton">
|
<widget class="QPushButton" name="cancelButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cancel</string>
|
<string>Exit without saving</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user