mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Remember selected index when returning from cheat category
This commit is contained in:
@@ -24,12 +24,18 @@ public:
|
||||
void Close();
|
||||
|
||||
State GetState() const { return _state; }
|
||||
const ICheatCategory* GetCurrentCheatCategory() const { return _categoryStack[_categoryStackLevel]; }
|
||||
const ICheatCategory* GetCurrentCheatCategory() const { return _categoryStack[_categoryStackLevel].cheatCategory; }
|
||||
|
||||
constexpr int GetSelectedItem() const { return _selectedItem; }
|
||||
void SetSelectedItem(int selectedItem) { _selectedItem = selectedItem; }
|
||||
|
||||
private:
|
||||
struct CategoryStackEntry
|
||||
{
|
||||
const ICheatCategory* cheatCategory;
|
||||
u32 index;
|
||||
};
|
||||
|
||||
FileInfo _romFileInfo;
|
||||
IRomBrowserController* _romBrowserController;
|
||||
QueueTask<void> _loadCheatsTask;
|
||||
@@ -38,5 +44,5 @@ private:
|
||||
int _selectedItem = -1;
|
||||
bool _changed = false;
|
||||
u32 _categoryStackLevel = 0;
|
||||
std::array<const ICheatCategory*, 8> _categoryStack;
|
||||
std::array<CategoryStackEntry, 8> _categoryStack;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user