mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +02:00
Add ability to move to and from the up button in the cheats panel with the dpad, fix oopsie with cheat category name text, update Usage.md
This commit is contained in:
@@ -128,7 +128,7 @@ void CheatsBottomSheetView::Update()
|
||||
else if (_currentCheatCategory != _viewModel->GetCurrentCheatCategory()
|
||||
&& _viewModel->GetCurrentCheatCategory() != nullptr)
|
||||
{
|
||||
// _secondaryLabel->SetText(_viewModel->GetCurrentCheatCategory()->GetName());
|
||||
_secondaryLabel->SetText(_viewModel->GetCurrentCheatCategory()->GetName());
|
||||
UpdateCheatList();
|
||||
}
|
||||
}
|
||||
@@ -223,6 +223,25 @@ void CheatsBottomSheetView::Draw(GraphicsContext& graphicsContext)
|
||||
graphicsContext.ResetClipArea();
|
||||
}
|
||||
|
||||
SharedPtr<View> CheatsBottomSheetView::MoveFocus(const SharedPtr<View>& currentFocus, FocusMoveDirection direction, View* source)
|
||||
{
|
||||
if (!currentFocus)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (source == _cheatListRecycler.GetPointer() && direction == FocusMoveDirection::Up && _viewModel->IsInSubCategory())
|
||||
{
|
||||
return _upButton;
|
||||
}
|
||||
else if (source == _upButton.GetPointer() && direction == FocusMoveDirection::Down)
|
||||
{
|
||||
return _cheatListRecycler->MoveFocus(currentFocus, direction, this);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool CheatsBottomSheetView::HandleInput(const InputProvider& inputProvider, FocusManager& focusManager)
|
||||
{
|
||||
if (inputProvider.Triggered(InputKey::B))
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
void InitVram(const VramContext& vramContext) override;
|
||||
void Update() override;
|
||||
void Draw(GraphicsContext& graphicsContext) override;
|
||||
SharedPtr<View> MoveFocus(const SharedPtr<View>& currentFocus, FocusMoveDirection direction, View* source) override;
|
||||
bool HandleInput(const InputProvider& inputProvider, FocusManager& focusManager) override;
|
||||
|
||||
void Focus(FocusManager& focusManager) override
|
||||
|
||||
Reference in New Issue
Block a user