mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 09:06:54 +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:
@@ -2,6 +2,8 @@
|
||||
#include "BannerView.h"
|
||||
#include "gui/views/LabelView.h"
|
||||
#include "../FileType/FileIcon.h"
|
||||
#include "romBrowser/viewModels/RomBrowserItemViewModel.h"
|
||||
#include "RomBrowserItemInputHandler.h"
|
||||
|
||||
class BannerListItemView : public BannerView
|
||||
{
|
||||
@@ -19,11 +21,13 @@ public:
|
||||
constexpr u32 GetVramOffset() const { return _vramOffset; }
|
||||
};
|
||||
|
||||
BannerListItemView(std::unique_ptr<LabelView> firstLine,
|
||||
std::unique_ptr<LabelView> secondLine, std::unique_ptr<LabelView> thirdLine);
|
||||
|
||||
void Update() override;
|
||||
|
||||
bool HandleInput(const InputProvider& inputProvider, FocusManager& focusManager) override;
|
||||
void HandlePenDown(const Point& touchPoint, FocusManager& focusManager) override;
|
||||
void HandlePenMove(const Point& touchPoint, FocusManager& focusManager) override;
|
||||
void HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager) override;
|
||||
|
||||
virtual void SetGraphics(const VramToken& vramToken) { }
|
||||
|
||||
void SetFirstLineAsync(TaskQueueBase* taskQueue, const char* firstLine, bool ellipsis) override
|
||||
@@ -60,8 +64,18 @@ public:
|
||||
_thirdLine->SetText(thirdLine, length);
|
||||
}
|
||||
|
||||
RomBrowserItemViewModel& GetViewModel() const
|
||||
{
|
||||
return *_viewModel;
|
||||
}
|
||||
|
||||
protected:
|
||||
std::unique_ptr<LabelView> _firstLine;
|
||||
std::unique_ptr<LabelView> _secondLine;
|
||||
std::unique_ptr<LabelView> _thirdLine;
|
||||
std::unique_ptr<RomBrowserItemViewModel> _viewModel;
|
||||
SharedPtr<LabelView> _firstLine;
|
||||
SharedPtr<LabelView> _secondLine;
|
||||
SharedPtr<LabelView> _thirdLine;
|
||||
RomBrowserItemInputHandler _inputHandler;
|
||||
|
||||
BannerListItemView(std::unique_ptr<RomBrowserItemViewModel> viewModel, SharedPtr<LabelView> firstLine,
|
||||
SharedPtr<LabelView> secondLine, SharedPtr<LabelView> thirdLine);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user