Change cheat implementation to show cheats in database order, fix some bugs

- AdvancedPaletteManager incorrectly handled negative y positions
- FocusManager still had a pointer to a view that was destroyed in the cheats panel. After changing focus, memory got corrupted.
This commit is contained in:
Gericom
2026-03-15 13:28:59 +01:00
parent 601fd6371e
commit b7d7f9f352
16 changed files with 313 additions and 424 deletions

View File

@@ -44,7 +44,7 @@ public:
/// @brief Gets the current cheat category.
/// @return The current cheat category.
const ICheatCategory* GetCurrentCheatCategory() const { return _categoryStack[_categoryStackLevel].cheatCategory; }
const CheatEntry* GetCurrentCheatCategory() const { return _categoryStack[_categoryStackLevel].cheatCategory; }
/// @brief Gets the index of the selected item.
/// @return The index of the selected item.
@@ -64,7 +64,7 @@ public:
private:
struct CategoryStackEntry
{
const ICheatCategory* cheatCategory;
const CheatEntry* cheatCategory;
u32 index;
};
@@ -78,5 +78,5 @@ private:
u32 _categoryStackLevel = 0;
std::array<CategoryStackEntry, 8> _categoryStack;
void DisableAllCheats(const ICheatCategory* cheatCategory);
void DisableAllCheats(const CheatEntry* cheatCategory);
};