mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
added modern controls checkbox to ui
This commit is contained in:
parent
5e62e7e39f
commit
f258b2c1a8
@ -13,6 +13,7 @@
|
|||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
#include <QComboBox>
|
||||||
#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->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
|
connect(m_ui->sound3DCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckbox3DSound);
|
||||||
connect(m_ui->joystickCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxJoystick);
|
connect(m_ui->joystickCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxJoystick);
|
||||||
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
connect(m_ui->fullscreenCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxFullscreen);
|
||||||
|
connect(m_ui->modernControlsCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxModernControls);
|
||||||
connect(m_ui->transitionTypeComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TransitionTypeChanged);
|
connect(m_ui->transitionTypeComboBox, &QComboBox::currentIndexChanged, this, &CMainDialog::TransitionTypeChanged);
|
||||||
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);
|
||||||
@ -214,6 +216,7 @@ void CMainDialog::UpdateInterface()
|
|||||||
m_ui->musicCheckBox->setChecked(currentConfigApp->m_music);
|
m_ui->musicCheckBox->setChecked(currentConfigApp->m_music);
|
||||||
m_ui->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
|
m_ui->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
|
||||||
m_ui->transitionTypeComboBox->setCurrentIndex(currentConfigApp->m_transition_type);
|
m_ui->transitionTypeComboBox->setCurrentIndex(currentConfigApp->m_transition_type);
|
||||||
|
m_ui->modernControlsCheckBox->setChecked(currentConfigApp->m_modern_controls_enabled);
|
||||||
m_ui->dataPath->setText(QString::fromStdString(currentConfigApp->m_cd_path));
|
m_ui->dataPath->setText(QString::fromStdString(currentConfigApp->m_cd_path));
|
||||||
m_ui->savePath->setText(QString::fromStdString(currentConfigApp->m_save_path));
|
m_ui->savePath->setText(QString::fromStdString(currentConfigApp->m_save_path));
|
||||||
}
|
}
|
||||||
@ -226,6 +229,7 @@ void CMainDialog::OnCheckbox3DSound(bool checked)
|
|||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// FUNCTION: CONFIG 0x004046d0
|
// FUNCTION: CONFIG 0x004046d0
|
||||||
void CMainDialog::OnRadiobuttonModelLowQuality(bool checked)
|
void CMainDialog::OnRadiobuttonModelLowQuality(bool checked)
|
||||||
{
|
{
|
||||||
@ -298,6 +302,13 @@ void CMainDialog::OnCheckboxFullscreen(bool checked)
|
|||||||
UpdateInterface();
|
UpdateInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CMainDialog::OnCheckboxModernControls(bool checked)
|
||||||
|
{
|
||||||
|
currentConfigApp->m_modern_controls_enabled = checked;
|
||||||
|
m_modified = true;
|
||||||
|
UpdateInterface();
|
||||||
|
}
|
||||||
|
|
||||||
void CMainDialog::TransitionTypeChanged(int index)
|
void CMainDialog::TransitionTypeChanged(int index)
|
||||||
{
|
{
|
||||||
currentConfigApp->m_transition_type = index;
|
currentConfigApp->m_transition_type = index;
|
||||||
|
|||||||
@ -43,6 +43,7 @@ private slots:
|
|||||||
void OnCheckboxJoystick(bool checked);
|
void OnCheckboxJoystick(bool checked);
|
||||||
void OnCheckboxMusic(bool checked);
|
void OnCheckboxMusic(bool checked);
|
||||||
void OnCheckboxFullscreen(bool checked);
|
void OnCheckboxFullscreen(bool checked);
|
||||||
|
void OnCheckboxModernControls(bool checked);
|
||||||
void TransitionTypeChanged(int index);
|
void TransitionTypeChanged(int index);
|
||||||
void accept() override;
|
void accept() override;
|
||||||
void reject() override;
|
void reject() override;
|
||||||
|
|||||||
@ -159,6 +159,7 @@ bool CConfigApp::ReadRegisterSettings()
|
|||||||
m_wide_view_angle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wide_view_angle);
|
m_wide_view_angle = iniparser_getboolean(dict, "isle:Wide View Angle", m_wide_view_angle);
|
||||||
m_3d_sound = iniparser_getboolean(dict, "isle:3DSound", m_3d_sound);
|
m_3d_sound = iniparser_getboolean(dict, "isle:3DSound", m_3d_sound);
|
||||||
m_draw_cursor = iniparser_getboolean(dict, "isle:Draw Cursor", m_draw_cursor);
|
m_draw_cursor = iniparser_getboolean(dict, "isle:Draw Cursor", m_draw_cursor);
|
||||||
|
m_modern_controls_enabled = iniparser_getboolean(dict, "isle:ModernControls", m_modern_controls_enabled);
|
||||||
m_model_quality = iniparser_getint(dict, "isle:Island Quality", m_model_quality);
|
m_model_quality = iniparser_getint(dict, "isle:Island Quality", m_model_quality);
|
||||||
m_texture_quality = iniparser_getint(dict, "isle:Island Texture", m_texture_quality);
|
m_texture_quality = iniparser_getint(dict, "isle:Island Texture", m_texture_quality);
|
||||||
m_use_joystick = iniparser_getboolean(dict, "isle:UseJoystick", m_use_joystick);
|
m_use_joystick = iniparser_getboolean(dict, "isle:UseJoystick", m_use_joystick);
|
||||||
@ -309,6 +310,7 @@ void CConfigApp::WriteRegisterSettings() const
|
|||||||
SetIniBool(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
SetIniBool(dict, "isle:Flip Surfaces", m_flip_surfaces);
|
||||||
SetIniBool(dict, "isle:Full Screen", m_full_screen);
|
SetIniBool(dict, "isle:Full Screen", m_full_screen);
|
||||||
SetIniBool(dict, "isle:Wide View Angle", m_wide_view_angle);
|
SetIniBool(dict, "isle:Wide View Angle", m_wide_view_angle);
|
||||||
|
SetIniBool(dict, "isle:isle:ModernControls", m_modern_controls_enabled);
|
||||||
|
|
||||||
SetIniInt(dict, "isle:Transition Type", m_transition_type);
|
SetIniInt(dict, "isle:Transition Type", m_transition_type);
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class CConfigApp {
|
|||||||
int m_display_bit_depth;
|
int m_display_bit_depth;
|
||||||
bool m_flip_surfaces;
|
bool m_flip_surfaces;
|
||||||
bool m_full_screen;
|
bool m_full_screen;
|
||||||
|
bool m_modern_controls_enabled;
|
||||||
int m_transition_type;
|
int m_transition_type;
|
||||||
bool m_3d_video_ram;
|
bool m_3d_video_ram;
|
||||||
bool m_wide_view_angle;
|
bool m_wide_view_angle;
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>575</width>
|
<width>575</width>
|
||||||
<height>600</height>
|
<height>618</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -23,7 +23,7 @@
|
|||||||
<iconset resource="config.qrc">
|
<iconset resource="config.qrc">
|
||||||
<normaloff>:/lego1.png</normaloff>:/lego1.png</iconset>
|
<normaloff>:/lego1.png</normaloff>:/lego1.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="sharkImageLabel">
|
<widget class="QLabel" name="sharkImageLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -187,6 +187,38 @@
|
|||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QGroupBox" name="textureQualityGroup">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set texture detail level.</string>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Island Texture Quality</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="textureQualityFastRadioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>Fast</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="textureQualityHighRadioButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>High</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QGroupBox" name="modelQualityGroup">
|
<widget class="QGroupBox" name="modelQualityGroup">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -275,38 +307,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QGroupBox" name="textureQualityGroup">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Set texture detail level.</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Island Texture Quality</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="textureQualityFastRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>Fast</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QRadioButton" name="textureQualityHighRadioButton">
|
|
||||||
<property name="text">
|
|
||||||
<string>High</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3">
|
<item row="1" column="3">
|
||||||
<widget class="QGroupBox" name="maxActorsGroup">
|
<widget class="QGroupBox" name="maxActorsGroup">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -358,28 +358,17 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="checkboxWidget" native="true">
|
<widget class="QWidget" name="checkboxWidget" native="true">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<property name="sizePolicy">
|
||||||
<item>
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<widget class="QCheckBox" name="sound3DCheckBox">
|
<horstretch>0</horstretch>
|
||||||
<property name="toolTip">
|
<verstretch>0</verstretch>
|
||||||
<string>Enable 3D positional audio effects.</string>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="layoutDirection">
|
||||||
<string>3D Sound</string>
|
<enum>Qt::LayoutDirection::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
</item>
|
<item row="0" column="3">
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="musicCheckBox">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Enable in-game background music.</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Music</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QCheckBox" name="joystickCheckBox">
|
<widget class="QCheckBox" name="joystickCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Enable joystick and gamepad support for LEGO Island.</string>
|
<string>Enable joystick and gamepad support for LEGO Island.</string>
|
||||||
@ -389,7 +378,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="4">
|
||||||
<widget class="QCheckBox" name="fullscreenCheckBox">
|
<widget class="QCheckBox" name="fullscreenCheckBox">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Toggle fullscreen display mode.</string>
|
<string>Toggle fullscreen display mode.</string>
|
||||||
@ -399,6 +388,33 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QCheckBox" name="sound3DCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Enable 3D positional audio effects.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>3D Sound</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QCheckBox" name="musicCheckBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Enable in-game background music.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Music</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" colspan="2">
|
||||||
|
<widget class="QCheckBox" name="modernControlsCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Enable Modern Controls</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -612,7 +628,6 @@
|
|||||||
<tabstop>modelQualityLowRadioButton</tabstop>
|
<tabstop>modelQualityLowRadioButton</tabstop>
|
||||||
<tabstop>modelQualityMediumRadioButton</tabstop>
|
<tabstop>modelQualityMediumRadioButton</tabstop>
|
||||||
<tabstop>modelQualityHighRadioButton</tabstop>
|
<tabstop>modelQualityHighRadioButton</tabstop>
|
||||||
<tabstop>maxLoDSlider</tabstop>
|
|
||||||
<tabstop>maxActorsSlider</tabstop>
|
<tabstop>maxActorsSlider</tabstop>
|
||||||
<tabstop>sound3DCheckBox</tabstop>
|
<tabstop>sound3DCheckBox</tabstop>
|
||||||
<tabstop>musicCheckBox</tabstop>
|
<tabstop>musicCheckBox</tabstop>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user