N64FlashcartMenu
Loading...
Searching...
No Matches
components.h
Go to the documentation of this file.
1
7#ifndef COMPONENTS_H__
8#define COMPONENTS_H__
9
10
11#include <libdragon.h>
12#include "menu_state.h"
13
14
20void component_box_draw (int x0, int y0, int x1, int y1, color_t color);
21void component_border_draw (int x0, int y0, int x1, int y1);
22void component_layout_draw (void);
23void component_progressbar_draw (int x0, int y0, int x1, int y1, float progress);
24void component_seekbar_draw (float progress);
25void component_loader_draw (float position);
26void component_scrollbar_draw (int x, int y, int width, int height, int position, int items, int visible_items);
27void component_file_list_scrollbar_draw (int position, int items, int visible_items);
28void component_dialog_draw (int width, int height);
29void component_messagebox_draw (char *fmt, ...);
30void component_main_text_draw (rdpq_align_t align, rdpq_valign_t valign, char *fmt, ...);
31void component_actions_bar_text_draw (rdpq_align_t align, rdpq_valign_t valign, char *fmt, ...);
32
33void component_background_init (char *cache_location);
34void component_background_free (void);
35void component_background_replace_image (surface_t *image);
36void component_background_draw (void);
37
38void component_file_list_draw (entry_t *list, int entries, int selected);
39
40typedef struct {
41 int count;
42 int selected;
43 bool hide_pending;
44 struct {
45 const char *text;
46 void (*action) (menu_t *menu);
47 } list[];
49
50#define COMPONENT_CONTEXT_MENU_LIST_END { .text = NULL }
51
52void component_context_menu_init (component_context_menu_t *cm);
53void component_context_menu_show (component_context_menu_t *cm);
54bool component_context_menu_process (menu_t *menu, component_context_menu_t *cm);
55void component_context_menu_draw (component_context_menu_t *cm);
56
58typedef struct {
59 bool loading;
60 surface_t *image;
62
63component_boxart_t *component_boxart_init (char *game_code);
64void component_boxart_free (component_boxart_t *b);
65void component_boxart_draw (component_boxart_t *b);
66 /* menu_components */
68
69
70#endif
Box Art Structure.
Definition: components.h:58
Definition: components.h:40
Menu State.
File Entry Structure.
Definition: menu_state.h:56
Menu Structure.
Definition: menu_state.h:63