Add cheat picker window
This commit is contained in:
26
include/panda_qt/cheats_window.hpp
Normal file
26
include/panda_qt/cheats_window.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
|
||||
#include <filesystem>
|
||||
#include <memory>
|
||||
#include <QAction>
|
||||
#include <QWidget>
|
||||
#include "emulator.hpp"
|
||||
|
||||
class QListWidget;
|
||||
|
||||
class CheatsWindow final : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CheatsWindow(Emulator* emu, const std::filesystem::path& path, QWidget* parent = nullptr);
|
||||
~CheatsWindow() = default;
|
||||
|
||||
private:
|
||||
void addEntry();
|
||||
void removeClicked();
|
||||
|
||||
QListWidget* cheatList;
|
||||
std::filesystem::path cheatPath;
|
||||
Emulator* emu;
|
||||
};
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "emulator.hpp"
|
||||
#include "panda_qt/about_window.hpp"
|
||||
#include "panda_qt/config_window.hpp"
|
||||
#include "panda_qt/cheats_window.hpp"
|
||||
#include "panda_qt/screen.hpp"
|
||||
#include "panda_qt/text_editor.hpp"
|
||||
#include "services/hid.hpp"
|
||||
@@ -54,15 +55,19 @@ class MainWindow : public QMainWindow {
|
||||
ScreenWidget screen;
|
||||
AboutWindow* aboutWindow;
|
||||
ConfigWindow* configWindow;
|
||||
CheatsWindow* cheatsEditor;
|
||||
TextEditorWindow* luaEditor;
|
||||
QMenuBar* menuBar = nullptr;
|
||||
|
||||
QAction* cheatsEditorAction = nullptr;
|
||||
|
||||
void swapEmuBuffer();
|
||||
void emuThreadMainLoop();
|
||||
void selectLuaFile();
|
||||
void selectROM();
|
||||
void dumpRomFS();
|
||||
void openLuaEditor();
|
||||
void openCheatsEditor();
|
||||
void showAboutMenu();
|
||||
void sendMessage(const EmulatorMessage& message);
|
||||
void dispatchMessage(const EmulatorMessage& message);
|
||||
|
||||
Reference in New Issue
Block a user