mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 04:21: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 <QMessageBox>
|
||||
#include <QProcess>
|
||||
#include <QComboBox>
|
||||
#include <mxdirectx/legodxinfo.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->joystickCheckBox, &QCheckBox::toggled, this, &CMainDialog::OnCheckboxJoystick);
|
||||
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->okButton, &QPushButton::clicked, this, &CMainDialog::accept);
|
||||
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->fullscreenCheckBox->setChecked(currentConfigApp->m_full_screen);
|
||||
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->savePath->setText(QString::fromStdString(currentConfigApp->m_save_path));
|
||||
}
|
||||
@ -226,6 +229,7 @@ void CMainDialog::OnCheckbox3DSound(bool checked)
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
|
||||
// FUNCTION: CONFIG 0x004046d0
|
||||
void CMainDialog::OnRadiobuttonModelLowQuality(bool checked)
|
||||
{
|
||||
@ -298,6 +302,13 @@ void CMainDialog::OnCheckboxFullscreen(bool checked)
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::OnCheckboxModernControls(bool checked)
|
||||
{
|
||||
currentConfigApp->m_modern_controls_enabled = checked;
|
||||
m_modified = true;
|
||||
UpdateInterface();
|
||||
}
|
||||
|
||||
void CMainDialog::TransitionTypeChanged(int index)
|
||||
{
|
||||
currentConfigApp->m_transition_type = index;
|
||||
|
||||
@ -43,6 +43,7 @@ private slots:
|
||||
void OnCheckboxJoystick(bool checked);
|
||||
void OnCheckboxMusic(bool checked);
|
||||
void OnCheckboxFullscreen(bool checked);
|
||||
void OnCheckboxModernControls(bool checked);
|
||||
void TransitionTypeChanged(int index);
|
||||
void accept() 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_3d_sound = iniparser_getboolean(dict, "isle:3DSound", m_3d_sound);
|
||||
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_texture_quality = iniparser_getint(dict, "isle:Island Texture", m_texture_quality);
|
||||
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:Full Screen", m_full_screen);
|
||||
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);
|
||||
|
||||
|
||||
@ -65,6 +65,7 @@ class CConfigApp {
|
||||
int m_display_bit_depth;
|
||||
bool m_flip_surfaces;
|
||||
bool m_full_screen;
|
||||
bool m_modern_controls_enabled;
|
||||
int m_transition_type;
|
||||
bool m_3d_video_ram;
|
||||
bool m_wide_view_angle;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>575</width>
|
||||
<height>600</height>
|
||||
<height>618</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -23,7 +23,7 @@
|
||||
<iconset resource="config.qrc">
|
||||
<normaloff>:/lego1.png</normaloff>:/lego1.png</iconset>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="sharkImageLabel">
|
||||
<property name="sizePolicy">
|
||||
@ -187,6 +187,38 @@
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</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">
|
||||
<widget class="QGroupBox" name="modelQualityGroup">
|
||||
<property name="maximumSize">
|
||||
@ -275,38 +307,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</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">
|
||||
<widget class="QGroupBox" name="maxActorsGroup">
|
||||
<property name="toolTip">
|
||||
@ -358,28 +358,17 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="checkboxWidget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<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>
|
||||
<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>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LayoutDirection::LeftToRight</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="joystickCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Enable joystick and gamepad support for LEGO Island.</string>
|
||||
@ -389,7 +378,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QCheckBox" name="fullscreenCheckBox">
|
||||
<property name="toolTip">
|
||||
<string>Toggle fullscreen display mode.</string>
|
||||
@ -399,6 +388,33 @@
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
@ -612,7 +628,6 @@
|
||||
<tabstop>modelQualityLowRadioButton</tabstop>
|
||||
<tabstop>modelQualityMediumRadioButton</tabstop>
|
||||
<tabstop>modelQualityHighRadioButton</tabstop>
|
||||
<tabstop>maxLoDSlider</tabstop>
|
||||
<tabstop>maxActorsSlider</tabstop>
|
||||
<tabstop>sound3DCheckBox</tabstop>
|
||||
<tabstop>musicCheckBox</tabstop>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user