|
|
|
@@ -8,11 +8,6 @@ |
|
|
|
#include "timer.h" |
|
|
|
|
|
|
|
|
|
|
|
#define color_menu (0xFFFFFFFFU) |
|
|
|
#define color_highlight (0xFFeeee00U) |
|
|
|
#define color_error (0xFFff4444U) |
|
|
|
|
|
|
|
|
|
|
|
static int get_input(nes_Input_Reader* reader, |
|
|
|
nes_input* input, int *last) { |
|
|
|
int status = nes_input_update(reader, input); |
|
|
|
@@ -121,6 +116,11 @@ static inline int n_visible(void) { |
|
|
|
return ((nes_ppu_render_h - 20) / 11); |
|
|
|
} |
|
|
|
|
|
|
|
static const uint32_t menu_colors[6] = { |
|
|
|
color_red, color_orange, color_yellow, |
|
|
|
color_green, color_blue, color_purple, |
|
|
|
}; |
|
|
|
|
|
|
|
static void show_menu(const menu_state* menu, int dim, int x, |
|
|
|
nes_Renderer* rend, |
|
|
|
const file_list* files) { |
|
|
|
@@ -145,11 +145,11 @@ static void show_menu(const menu_state* menu, int dim, int x, |
|
|
|
"..." : filename, |
|
|
|
x, y, |
|
|
|
(menu->cursor == n) ? |
|
|
|
color_highlight : color_menu |
|
|
|
color_white : menu_colors[n % 6] |
|
|
|
); |
|
|
|
if (menu->cursor == n) { |
|
|
|
nes_draw_text(rend, ">", x - 10, y, |
|
|
|
color_highlight); |
|
|
|
color_white); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|