add more fun labels

This commit is contained in:
Arisotura 2022-09-20 20:30:26 +02:00
parent 0303c74d7b
commit 621af5f535
5 changed files with 108 additions and 73 deletions

View File

@ -22,6 +22,7 @@
#include "types.h"
#include "Config.h"
#include "Platform.h"
#include "PathSettingsDialog.h"
#include "ui_PathSettingsDialog.h"
@ -43,6 +44,12 @@ PathSettingsDialog::PathSettingsDialog(QWidget* parent) : QDialog(parent), ui(ne
ui->txtSaveFilePath->setText(QString::fromStdString(Config::SaveFilePath));
ui->txtSavestatePath->setText(QString::fromStdString(Config::SavestatePath));
ui->txtCheatFilePath->setText(QString::fromStdString(Config::CheatFilePath));
int inst = Platform::InstanceID();
if (inst > 0)
ui->lblInstanceNum->setText(QString("Configuring paths for instance %1").arg(inst+1));
else
ui->lblInstanceNum->hide();
}
PathSettingsDialog::~PathSettingsDialog()

View File

@ -7,49 +7,63 @@
<x>0</x>
<y>0</y>
<width>439</width>
<height>166</height>
<height>185</height>
</rect>
</property>
<property name="windowTitle">
<string>Path settings - melonDS</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLineEdit" name="txtSaveFilePath">
<property name="clearButtonEnabled">
<bool>true</bool>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Cheat files path:</string>
</property>
</widget>
</item>
<item row="2" column="2">
<item row="3" column="2">
<widget class="QPushButton" name="btnCheatFileBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="0">
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Savestates path:</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<widget class="QLabel" name="label_5">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="txtSavestatePath">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QPushButton" name="btnSaveFileBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="txtCheatFilePath">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="label">
<property name="text">
<string>Leave a path blank to use the current ROM's path.</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<item row="6" column="0" colspan="3">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -59,35 +73,14 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Cheat files path:</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="btnSaveFileBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="2">
<item row="2" column="2">
<widget class="QPushButton" name="btnSavestateBrowse">
<property name="text">
<string>Browse...</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="txtSavestatePath">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0">
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Save files path:</string>
@ -95,9 +88,23 @@
</widget>
</item>
<item row="4" column="0" colspan="3">
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label">
<property name="text">
<string/>
<string>Leave a path blank to use the current ROM's path.</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLineEdit" name="txtSaveFilePath">
<property name="clearButtonEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="0" colspan="3">
<widget class="QLabel" name="lblInstanceNum">
<property name="text">
<string>Configuring paths for instance X</string>
</property>
</widget>
</item>

View File

@ -23,6 +23,7 @@
#include "DSi_I2C.h"
#include "NDS.h"
#include "Config.h"
#include "Platform.h"
#include "types.h"
@ -65,6 +66,12 @@ PowerManagementDialog::PowerManagementDialog(QWidget* parent) : QDialog(parent),
}
ui->sliderDSiBatteryLevel->setValue(dsiBatterySliderPos);
int inst = Platform::InstanceID();
if (inst > 0)
ui->lblInstanceNum->setText(QString("Setting battery levels for instance %1").arg(inst+1));
else
ui->lblInstanceNum->hide();
inited = true;
}

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>562</width>
<height>279</height>
<height>288</height>
</rect>
</property>
<property name="sizePolicy">
@ -23,37 +23,7 @@
<property name="sizeConstraint">
<enum>QLayout::SetFixedSize</enum>
</property>
<item row="0" column="0">
<widget class="QGroupBox" name="grpDSBattery">
<property name="title">
<string>DS Battery</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1">
<widget class="QRadioButton" name="rbDSBatteryLow">
<property name="text">
<string>Low</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Battery Level</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbDSBatteryOkay">
<property name="text">
<string>Okay</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -63,7 +33,7 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QGroupBox" name="grpDSiBattery">
<property name="title">
<string>DSi Battery</string>
@ -219,6 +189,49 @@
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="grpDSBattery">
<property name="title">
<string>DS Battery</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1">
<widget class="QRadioButton" name="rbDSBatteryLow">
<property name="text">
<string>Low</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Battery Level</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QRadioButton" name="rbDSBatteryOkay">
<property name="text">
<string>Okay</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lblInstanceNum">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Configuring settings for instance X</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources>

View File

@ -1796,6 +1796,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent)
actVideoSettings->setEnabled(false);
actMPSettings->setEnabled(false);
actWifiSettings->setEnabled(false);
actInterfaceSettings->setEnabled(false);
#ifdef __APPLE__
actPreferences->setEnabled(false);