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:
58
arm9/source/gui/views/ViewContainer.cpp
Normal file
58
arm9/source/gui/views/ViewContainer.cpp
Normal file
@@ -0,0 +1,58 @@
|
||||
#include "common.h"
|
||||
#include "ViewContainer.h"
|
||||
|
||||
void ViewContainer::InitVram(const VramContext& vramContext)
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.InitVram(vramContext);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::Update()
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.Update();
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::Draw(GraphicsContext& graphicsContext)
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.Draw(graphicsContext);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::VBlank()
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.VBlank();
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::HandlePenDown(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.HandlePenDown(touchPoint, focusManager);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::HandlePenMove(const Point& touchPoint, FocusManager& focusManager)
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.HandlePenMove(touchPoint, focusManager);
|
||||
}
|
||||
}
|
||||
|
||||
void ViewContainer::HandlePenUp(const Point& lastTouchPoint, FocusManager& focusManager)
|
||||
{
|
||||
for (auto& view : _children)
|
||||
{
|
||||
view.HandlePenUp(lastTouchPoint, focusManager);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user