Skip to content

Commit

Permalink
Fix Script Scrollable Multichoice Arrow Positions (rh-hideout#5884)
Browse files Browse the repository at this point in the history
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
  • Loading branch information
ghoulslash and ghoulslash authored Dec 27, 2024
1 parent 91c7bd9 commit 767e5a1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/field_specials.c
Original file line number Diff line number Diff line change
Expand Up @@ -2766,10 +2766,12 @@ static void ScrollableMultichoice_UpdateScrollArrows(u8 taskId)
struct ScrollArrowsTemplate template = sScrollableMultichoice_ScrollArrowsTemplate;
if (task->tMaxItemsOnScreen != task->tNumItems)
{
u32 y0 = (8 * (task->tTop - 1));

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.secondY = task->tHeight * 8 + 10;
template.secondY = task->tHeight * 8 + 10 + y0;
template.fullyUpThreshold = 0;
template.fullyDownThreshold = task->tNumItems - task->tMaxItemsOnScreen;
task->tScrollArrowId = AddScrollIndicatorArrowPair(&template, &gScrollableMultichoice_ScrollOffset);
Expand Down

0 comments on commit 767e5a1

Please sign in to comment.