Paging fixes

This commit is contained in:
Duckbill 2017-12-25 13:45:09 +03:00
parent 5def0c18e2
commit 78791f7b66

View File

@ -1056,14 +1056,14 @@ void RosalinaMenu_Cheats(void) {
&& page * CHEATS_PER_MENU_PAGE + i < cheatCount; && page * CHEATS_PER_MENU_PAGE + i < cheatCount;
i++) { i++) {
char buf[65] = { 0 }; char buf[65] = { 0 };
const char * checkbox = (cheats[i]->active ? "(x) " : "( ) "); s32 j = page * CHEATS_PER_MENU_PAGE + i;
const char * keyAct = (cheats[i]->keyActivated ? "*" : " "); const char * checkbox = (cheats[j]->active ? "(x) " : "( ) ");
sprintf(buf, "%s%s%s", checkbox, keyAct, cheats[i]->name); const char * keyAct = (cheats[j]->keyActivated ? "*" : " ");
sprintf(buf, "%s%s%s", checkbox, keyAct, cheats[j]->name);
Draw_DrawString(30, 30 + i * SPACING_Y, COLOR_WHITE, buf); Draw_DrawString(30, 30 + i * SPACING_Y, COLOR_WHITE, buf);
Draw_DrawCharacter(10, 30 + i * SPACING_Y, COLOR_TITLE, Draw_DrawCharacter(10, 30 + i * SPACING_Y, COLOR_TITLE,
page * CHEATS_PER_MENU_PAGE + i == selected ? j == selected ? '>' : ' ');
'>' : ' ');
} }
Draw_FlushFramebuffer(); Draw_FlushFramebuffer();