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

@@ -40,13 +40,13 @@ void ChipView::Draw(GraphicsContext& graphicsContext)
DirectPalette(chipPltt), _position.y, _position.y + 20);
if (!_isFocused)
{
_label.SetBackgroundColor(_materialColorScheme->secondaryContainer);
_label.SetForegroundColor(_materialColorScheme->onSecondaryContainer);
_label->SetBackgroundColor(_materialColorScheme->secondaryContainer);
_label->SetForegroundColor(_materialColorScheme->onSecondaryContainer);
}
else
{
_label.SetBackgroundColor(fgColor);
_label.SetForegroundColor(_materialColorScheme->onSecondaryContainer);
_label->SetBackgroundColor(fgColor);
_label->SetForegroundColor(_materialColorScheme->onSecondaryContainer);
}
}
else
@@ -70,13 +70,13 @@ void ChipView::Draw(GraphicsContext& graphicsContext)
if (!_isFocused)
{
_label.SetBackgroundColor(_materialColorScheme->GetColor(_backgroundColor));
_label.SetForegroundColor(_materialColorScheme->onSurfaceVariant);
_label->SetBackgroundColor(_materialColorScheme->GetColor(_backgroundColor));
_label->SetForegroundColor(_materialColorScheme->onSurfaceVariant);
}
else
{
_label.SetBackgroundColor(fgColor);
_label.SetForegroundColor(_materialColorScheme->onSurfaceVariant);
_label->SetBackgroundColor(fgColor);
_label->SetForegroundColor(_materialColorScheme->onSurfaceVariant);
}
}
@@ -88,7 +88,7 @@ void ChipView::Draw(GraphicsContext& graphicsContext)
.WithPriority(graphicsContext.GetPriority())
.Build(oams[0]);
OamBuilder::OamWithSize<64, 32>(
_position.x + width - 48 - 16,
_position.x + width - 48 - 16,
_position.y, _vramOffset >> 7)
.WithPalette16(paletteRow)
.WithPriority(graphicsContext.GetPriority())
@@ -97,8 +97,8 @@ void ChipView::Draw(GraphicsContext& graphicsContext)
DrawIcon(graphicsContext, fgColor);
_label.SetPosition(_position.x + (_iconVramOffset == 0xFFFFFFFF ? 10 : 22), _position.y + 3);
_label.Draw(graphicsContext);
_label->SetPosition(_position.x + (_iconVramOffset == 0xFFFFFFFF ? 10 : 22), _position.y + 3);
_label->Draw(graphicsContext);
}
void ChipView::DrawIcon(GraphicsContext& graphicsContext, const Rgb<8, 8, 8>& fgColor)
@@ -135,4 +135,4 @@ ChipView::VramToken ChipView::UploadGraphics(IVramManager& vramManager)
u32 vramOffset = vramManager.Alloc(chipFilledTilesLen);
dma_ntrCopy32(3, chipFilledTiles, vramManager.GetVramAddress(vramOffset), chipFilledTilesLen);
return ChipView::VramToken(vramOffset);
}
}