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 "MaterialCoverView.h"
|
||||
|
||||
void MaterialCoverView::InitVram(const VramContext& vramContext)
|
||||
@@ -17,6 +18,11 @@ void MaterialCoverView::InitVram(const VramContext& vramContext)
|
||||
}
|
||||
}
|
||||
|
||||
void MaterialCoverView::Update()
|
||||
{
|
||||
_viewModel->DisposeQueueTaskWhenComplete();
|
||||
}
|
||||
|
||||
void MaterialCoverView::Draw(GraphicsContext& graphicsContext)
|
||||
{
|
||||
if (_cover.Lock() && _textureLoadRequest.GetState() == VBlankTextureLoadRequestState::LoadComplete)
|
||||
@@ -44,6 +50,27 @@ void MaterialCoverView::Draw(GraphicsContext& graphicsContext)
|
||||
}
|
||||
}
|
||||
|
||||
bool MaterialCoverView::HandleInput(const InputProvider& inputProvider, FocusManager& focusManager)
|
||||
{
|
||||
return _inputHandler.HandleInput(inputProvider, focusManager)
|
||||
|| View::HandleInput(inputProvider, focusManager);
|
||||
}
|
||||
|
||||
void MaterialCoverView::HandlePenDown(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenDown(touchPoint, focusManager);
|
||||
}
|
||||
|
||||
void MaterialCoverView::HandlePenMove(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenMove(touchPoint, focusManager);
|
||||
}
|
||||
|
||||
void MaterialCoverView::HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager)
|
||||
{
|
||||
_inputHandler.HandlePenUp(lastTouchPoint, focusManager);
|
||||
}
|
||||
|
||||
void MaterialCoverView::UploadCoverGraphics()
|
||||
{
|
||||
if (auto cover = _cover.Lock())
|
||||
|
||||
Reference in New Issue
Block a user