Add pagination to game launcher - 4 games per page

- GameLauncher now displays only 4 games per page to keep menu in bounds
- Added page navigation with page indicator (Page X/Y)
- KEY0 navigates between pages and within page
- KEY1 selects the highlighted game
- Touch selection works on current page only
- Helper methods: get_total_pages(), get_page_start_index(), get_page_end_index()
- Updated both lib/ and emulator/ versions for consistency
This commit is contained in:
Adolfo Reyna
2026-02-12 20:39:38 -05:00
parent 50793ac535
commit 38ffdac749
155 changed files with 14785 additions and 39340 deletions

View File

@@ -95,11 +95,18 @@ private:
std::vector<GameEntry> games;
int selected_index; // Currently highlighted game
Game* selected_game; // Currently running game (nullptr = in menu)
int current_page; // Current page in pagination
// Menu layout constants
static const int MENU_Y_START = 60;
static const int MENU_ITEM_HEIGHT = 40;
static const int MENU_PADDING = 10;
static const int GAMES_PER_PAGE = 4;
// Helper functions for pagination
int get_total_pages() const;
int get_page_start_index() const;
int get_page_end_index() const;
};
#endif // GAME_LAUNCHER_H