mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Further work on support for cheats
Cheats can now be enabled/disabled and games can be launched with cheats
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "gui/views/RecyclerView.h"
|
||||
#include "romBrowser/viewModels/CheatsViewModel.h"
|
||||
#include "CheatsAdapter.h"
|
||||
#include "CheatListItemView.h"
|
||||
|
||||
class MaterialColorScheme;
|
||||
class IFontRepository;
|
||||
@@ -17,6 +18,15 @@ public:
|
||||
const MaterialColorScheme* materialColorScheme, const IFontRepository* fontRepository,
|
||||
FocusManager* focusManager);
|
||||
|
||||
~CheatsBottomSheetView() override
|
||||
{
|
||||
_cheatListRecycler.reset();
|
||||
if (_cheatsAdapter != nullptr)
|
||||
{
|
||||
delete _cheatsAdapter;
|
||||
}
|
||||
}
|
||||
|
||||
void InitVram(const VramContext& vramContext) override;
|
||||
void Update() override;
|
||||
void Draw(GraphicsContext& graphicsContext) override;
|
||||
@@ -24,19 +34,20 @@ public:
|
||||
|
||||
void Focus(FocusManager& focusManager) override
|
||||
{
|
||||
_cheatListRecycler.Focus(focusManager);
|
||||
_cheatListRecycler->Focus(focusManager);
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<CheatsViewModel> _viewModel;
|
||||
Label2DView _titleLabel;
|
||||
RecyclerView _cheatListRecycler;
|
||||
std::unique_ptr<RecyclerView> _cheatListRecycler;
|
||||
CheatsAdapter* _cheatsAdapter = nullptr;
|
||||
const MaterialColorScheme* _materialColorScheme;
|
||||
const IFontRepository* _fontRepository;
|
||||
IVramManager* _objVramManager;
|
||||
FocusManager* _focusManager;
|
||||
u32 _folderIconVramOffset = 0;
|
||||
u32 _checkboxUncheckedIconVramOffset = 0;
|
||||
u32 _checkboxCheckedIconVramOffset = 0;
|
||||
CheatListItemView::VramOffsets _vramOffsets;
|
||||
u32 _savedVramState = 0;
|
||||
|
||||
void UpdateCheatList();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user