Start working on settings
This commit is contained in:
@@ -49,16 +49,6 @@ void KaizenQt::LoadROM(const QString& file_name) noexcept {
|
||||
emuThread->core->LoadROM(file_name.toStdString());
|
||||
}
|
||||
|
||||
static inline u32 QtKeyToN64Controller(Qt::Key k) {
|
||||
u32 ret{};
|
||||
printf("Valore prima: %08X\n", ret);
|
||||
|
||||
|
||||
printf("Valore dopo: %08X\n", ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void KaizenQt::keyPressEvent(QKeyEvent *e) {
|
||||
emuThread->core->pause = true;
|
||||
auto k = static_cast<Qt::Key>(e->key());
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <QMessageBox>
|
||||
#include <QKeyEvent>
|
||||
#include <MainWindow.hpp>
|
||||
#include <QSlider>
|
||||
|
||||
MainWindowController::MainWindowController() noexcept {
|
||||
view.setupUi(this);
|
||||
@@ -55,4 +56,12 @@ void MainWindowController::ConnectSignalsToSlots() noexcept {
|
||||
"Kaizen is licensed under the BSD 3-clause license.\n"
|
||||
"Nintendo 64 is a registered trademarks of Nintendo Co., Ltd."));
|
||||
});
|
||||
|
||||
connect(view.actionSettings, &QAction::triggered, this, [this]() {
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->addWidget(new QSlider(Qt::Horizontal));
|
||||
auto settings = new QWidget;
|
||||
settings->setLayout(layout);
|
||||
settings->show();
|
||||
});
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="RenderWidget" name="vulkanWidget"/>
|
||||
<widget class="RenderWidget" name="vulkanWidget" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -41,7 +41,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>21</height>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
@@ -55,6 +55,7 @@
|
||||
<property name="title">
|
||||
<string>Emulation</string>
|
||||
</property>
|
||||
<addaction name="actionSettings"/>
|
||||
<addaction name="actionPause"/>
|
||||
<addaction name="actionReset"/>
|
||||
<addaction name="actionStop"/>
|
||||
@@ -121,6 +122,17 @@
|
||||
<string>Stop the emulation</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="text">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string>Open the settings window</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
||||
Reference in New Issue
Block a user