Add scroll modifier

This commit is contained in:
Miloslav Ciz 2025-03-23 16:43:35 +01:00
parent 9ec3c6b406
commit 8450e113fa
5 changed files with 15 additions and 63 deletions

View file

@ -1822,7 +1822,7 @@ void LCR_rendererBlitImage(uint8_t index, unsigned int x, unsigned int y,
}
void LCR_rendererDrawMenu(const char *tabName,const char **items,
unsigned char itemCount,char selectedItem)
unsigned char itemCount,char selectedItem, char scroll)
{
int stripHeight = (2 * LCR_EFFECTIVE_RESOLUTION_Y) / 7;
int stripHeight2 = LCR_EFFECTIVE_RESOLUTION_Y / 9;
@ -1881,9 +1881,9 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
i = stripHeight + (stripHeight2 - LCR_rendererComputeTextHeight(3)) / 2;
for (int j = 0; j < itemCount + 1; ++j)
for (int j = 0; j < itemCount + 1 + (scroll != 0) ; ++j)
{
const char *s = j ? items[j - 1] : tabName;
const char *s = j ? (j <= itemCount ? items[j - 1] : "...") : tabName;
const char *s2 = s;
uint16_t textColor = 0x5aeb;