mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 00:56:55 +02:00
Add touch input support, add fast scrolling support for coverflow display mode, fix use after free bug in banner list mode
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "gui/Gx.h"
|
||||
#include "gui/materialDesign.h"
|
||||
#include "gui/GraphicsContext.h"
|
||||
#include "gui/input/InputProvider.h"
|
||||
#include "CoverView.h"
|
||||
|
||||
void CoverView::InitVram(const VramContext& vramContext)
|
||||
@@ -17,6 +18,11 @@ void CoverView::InitVram(const VramContext& vramContext)
|
||||
}
|
||||
}
|
||||
|
||||
void CoverView::Update()
|
||||
{
|
||||
_viewModel->DisposeQueueTaskWhenComplete();
|
||||
}
|
||||
|
||||
void CoverView::Draw(GraphicsContext& graphicsContext)
|
||||
{
|
||||
if (_cover.Lock() && _textureLoadRequest.GetState() == VBlankTextureLoadRequestState::LoadComplete)
|
||||
@@ -93,3 +99,24 @@ void CoverView::UploadCoverGraphics()
|
||||
_vblankTextureLoader->RequestLoad(_textureLoadRequest);
|
||||
}
|
||||
}
|
||||
|
||||
bool CoverView::HandleInput(const InputProvider& inputProvider, FocusManager& focusManager)
|
||||
{
|
||||
return _inputHandler.HandleInput(inputProvider, focusManager)
|
||||
|| View::HandleInput(inputProvider, focusManager);
|
||||
}
|
||||
|
||||
void CoverView::HandlePenDown(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenDown(touchPoint, focusManager);
|
||||
}
|
||||
|
||||
void CoverView::HandlePenMove(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenMove(touchPoint, focusManager);
|
||||
}
|
||||
|
||||
void CoverView::HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenUp(lastTouchPoint, focusManager);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user