Fix Script Scrollable Multichoice Arrow Positions (#5884)

Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
ghoulslash 2024-12-27 01:55:56 -05:00 committed by GitHub
parent 91c7bd9e53
commit 767e5a1f29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2766,10 +2766,12 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId)
struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate; struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate;
if (task->tMaxItemsOnScreen != task->tNumItems) if (task->tMaxItemsOnScreen != task->tNumItems)
{ {
u32 y0 = (8 * (task->tTop - 1));
template.firstX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8; template.firstX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
template.firstY = 8; template.firstY = 8 + y0;
template.secondX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8; template.secondX = (task->tWidth / 2) * 8 + 12 + (task->tLeft - 1) * 8;
template.secondY = task->tHeight * 8 + 10; template.secondY = task->tHeight * 8 + 10 + y0;
template.fullyUpThreshold = 0; template.fullyUpThreshold = 0;
template.fullyDownThreshold = task->tNumItems - task->tMaxItemsOnScreen; template.fullyDownThreshold = task->tNumItems - task->tMaxItemsOnScreen;
task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &gScrollableMultichoice_ScrollOffset); task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &gScrollableMultichoice_ScrollOffset);