mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-16 16:21:03 +00:00
Qt/savedata: use rsx overlays selection_code
This commit is contained in:
parent
984bf67d84
commit
14ca506774
@ -65,7 +65,7 @@ save_data_list_dialog::save_data_list_dialog(const std::vector<SaveDataEntry>& e
|
||||
QPushButton *saveNewEntry = new QPushButton(tr("Save New Entry"), this);
|
||||
connect(saveNewEntry, &QAbstractButton::clicked, this, [&]()
|
||||
{
|
||||
m_entry = selection_code::new_save;
|
||||
m_entry = rsx::overlays::user_interface::selection_code::new_save;
|
||||
accept();
|
||||
});
|
||||
hbox_action->addWidget(saveNewEntry);
|
||||
@ -135,15 +135,15 @@ s32 save_data_list_dialog::GetSelection() const
|
||||
{
|
||||
if (result() == QDialog::Accepted)
|
||||
{
|
||||
if (m_entry == selection_code::new_save)
|
||||
if (m_entry == rsx::overlays::user_interface::selection_code::new_save)
|
||||
{ // Save new entry
|
||||
return selection_code::new_save;
|
||||
return rsx::overlays::user_interface::selection_code::new_save;
|
||||
}
|
||||
return m_list->item(m_entry, 0)->data(Qt::UserRole).toInt();
|
||||
}
|
||||
|
||||
// Cancel is pressed. May figure out proper cellsavedata code to use later.
|
||||
return selection_code::canceled;
|
||||
return rsx::overlays::user_interface::selection_code::canceled;
|
||||
}
|
||||
|
||||
void save_data_list_dialog::OnSort(int logicalIndex)
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "util/types.hpp"
|
||||
#include "Emu/Memory/vm.h"
|
||||
#include "Emu/Cell/Modules/cellSaveData.h"
|
||||
#include "Emu/RSX/Overlays/overlays.h"
|
||||
|
||||
#include <QTableWidget>
|
||||
#include <QDialog>
|
||||
@ -20,12 +21,6 @@ class save_data_list_dialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
enum selection_code
|
||||
{
|
||||
new_save = -1,
|
||||
canceled = -2
|
||||
};
|
||||
|
||||
public:
|
||||
explicit save_data_list_dialog(const std::vector<SaveDataEntry>& entries, s32 focusedEntry, u32 op, vm::ptr<CellSaveDataListSet>, QWidget* parent = nullptr);
|
||||
|
||||
@ -37,7 +32,7 @@ private:
|
||||
void UpdateSelectionLabel();
|
||||
void UpdateList();
|
||||
|
||||
s32 m_entry = selection_code::new_save;
|
||||
s32 m_entry = rsx::overlays::user_interface::selection_code::new_save;
|
||||
QLabel* m_entry_label = nullptr;
|
||||
|
||||
QTableWidget* m_list = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user