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:
Gericom
2026-04-04 19:24:39 +02:00
parent 21a8790ebc
commit 97762b14d3
119 changed files with 2251 additions and 762 deletions

View File

@@ -1,21 +1,26 @@
#include "common.h"
#include "gui/IVramManager.h"
#include "gui/GraphicsContext.h"
#include "gui/input/InputProvider.h"
#include "BannerListItemView.h"
BannerListItemView::BannerListItemView(std::unique_ptr<LabelView> firstLine,
std::unique_ptr<LabelView> secondLine, std::unique_ptr<LabelView> thirdLine)
: _firstLine(std::move(firstLine))
BannerListItemView::BannerListItemView(std::unique_ptr<RomBrowserItemViewModel> viewModel,
SharedPtr<LabelView> firstLine, SharedPtr<LabelView> secondLine, SharedPtr<LabelView> thirdLine)
: _viewModel(std::move(viewModel))
, _firstLine(std::move(firstLine))
, _secondLine(std::move(secondLine))
, _thirdLine(std::move(thirdLine))
, _inputHandler(this, _viewModel.get())
{
AddChildTail(_firstLine.get());
AddChildTail(_secondLine.get());
AddChildTail(_thirdLine.get());
AddChildTail(_firstLine.GetPointer());
AddChildTail(_secondLine.GetPointer());
AddChildTail(_thirdLine.GetPointer());
}
void BannerListItemView::Update()
{
_viewModel->DisposeQueueTaskWhenComplete();
ViewContainer::Update();
if (_icon)
@@ -23,3 +28,24 @@ void BannerListItemView::Update()
_icon->Update();
}
}
bool BannerListItemView::HandleInput(const InputProvider& inputProvider, FocusManager& focusManager)
{
return _inputHandler.HandleInput(inputProvider, focusManager)
|| View::HandleInput(inputProvider, focusManager);
}
void BannerListItemView::HandlePenDown(const Point& touchPoint, FocusManager& focusManager)
{
_inputHandler.HandlePenDown(touchPoint, focusManager);
}
void BannerListItemView::HandlePenMove(const Point& touchPoint, FocusManager& focusManager)
{
_inputHandler.HandlePenMove(touchPoint, focusManager);
}
void BannerListItemView::HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager)
{
_inputHandler.HandlePenUp(lastTouchPoint, focusManager);
}