mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-06-02 17:16:57 +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:
@@ -7,12 +7,46 @@ bool IconButtonView::HandleInput(const InputProvider& inputProvider, FocusManage
|
||||
if (inputProvider.Triggered(InputKey::A))
|
||||
{
|
||||
if (_action)
|
||||
{
|
||||
_action(this, _actionArg);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return View::HandleInput(inputProvider, focusManager);
|
||||
}
|
||||
|
||||
void IconButtonView::HandlePenDown(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
if (GetBounds().Contains(touchPoint))
|
||||
{
|
||||
_penDown = true;
|
||||
}
|
||||
}
|
||||
|
||||
void IconButtonView::HandlePenMove(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
if (!GetBounds().Contains(touchPoint))
|
||||
{
|
||||
_penDown = false;
|
||||
}
|
||||
}
|
||||
|
||||
void IconButtonView::HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager)
|
||||
{
|
||||
if (_penDown && GetBounds().Contains(lastTouchPoint))
|
||||
{
|
||||
focusManager.Focus(SharedFromThis());
|
||||
|
||||
if (_action)
|
||||
{
|
||||
_action(this, _actionArg);
|
||||
}
|
||||
}
|
||||
|
||||
_penDown = false;
|
||||
}
|
||||
|
||||
bool IconButtonView::IsCircleBackgroundVisible() const
|
||||
{
|
||||
switch (_type)
|
||||
|
||||
Reference in New Issue
Block a user