Skip to content

Commit

Permalink
Fixed game mode scroll arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
t3knomanzer committed Jul 25, 2020
1 parent bfa1439 commit c3f74ad
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Embedded/MaxMix/MaxMix.ino
Original file line number Diff line number Diff line change
Expand Up @@ -418,27 +418,36 @@ void UpdateDisplay()
return;
}

uint8_t scrollLeft = CanScrollLeft(itemIndex, itemCount, settings.continuousScroll);
uint8_t scrollRight = CanScrollRight(itemIndex, itemCount, settings.continuousScroll);

if(mode == MODE_MASTER)
{
DisplayMasterSelectScreen(display, items[0].volume, mode, MODE_COUNT);
}
else if(mode == MODE_APPLICATION)
{
if(stateApplication == STATE_APPLICATION_NAVIGATE)
{
uint8_t scrollLeft = CanScrollLeft(itemIndex, itemCount, settings.continuousScroll);
uint8_t scrollRight = CanScrollRight(itemIndex, itemCount, settings.continuousScroll);
DisplayApplicationSelectScreen(display, items[itemIndex].name, items[itemIndex].volume, scrollLeft, scrollRight, mode, MODE_COUNT);
}

else if(stateApplication == STATE_APPLICATION_EDIT)
DisplayApplicationEditScreen(display, items[itemIndex].name, items[itemIndex].volume, mode, MODE_COUNT);
}
else if(mode == MODE_GAME)
{
if(stateGame == STATE_GAME_SELECT_A)
{
uint8_t scrollLeft = CanScrollLeft(itemIndexA, itemCount, settings.continuousScroll);
uint8_t scrollRight = CanScrollRight(itemIndexA, itemCount, settings.continuousScroll);
DisplayGameSelectScreen(display, items[itemIndexA].name, items[itemIndexA].volume, "A", scrollLeft, scrollRight, mode, MODE_COUNT);
}
else if(stateGame == STATE_GAME_SELECT_B)
{
uint8_t scrollLeft = CanScrollLeft(itemIndexB, itemCount, settings.continuousScroll);
uint8_t scrollRight = CanScrollRight(itemIndexB, itemCount, settings.continuousScroll);
DisplayGameSelectScreen(display, items[itemIndexB].name, items[itemIndexB].volume, "B", scrollLeft, scrollRight, mode, MODE_COUNT);
}
else if(stateGame == STATE_GAME_EDIT)
DisplayGameEditScreen(display, items[itemIndexA].name, items[itemIndexB].name, items[itemIndexA].volume, items[itemIndexB].volume, mode, MODE_COUNT);
}
Expand Down

0 comments on commit c3f74ad

Please sign in to comment.