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_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 component_context_menu {
41 int count;
42 int selected;
43 bool hide_pending;
44 struct component_context_menu *parent;
45 struct component_context_menu *submenu;
46 struct {
47 const char *text;
48 void (*action) (menu_t *menu, void *arg);
49 void *arg;
50 struct component_context_menu *submenu;
51 } list[];
53
54#define COMPONENT_CONTEXT_MENU_LIST_END { .text = NULL }
55
56void component_context_menu_init (component_context_menu_t *cm);
57void component_context_menu_show (component_context_menu_t *cm);
58bool component_context_menu_process (menu_t *menu, component_context_menu_t *cm);
59void component_context_menu_draw (component_context_menu_t *cm);
60
62typedef struct {
63 bool loading;
64 surface_t *image;
66
67component_boxart_t *component_boxart_init (const char *storage_prefix, char *game_code);
68void component_boxart_free (component_boxart_t *b);
69void component_boxart_draw (component_boxart_t *b);
70 /* menu_components */
72
73
74#endif
Box Art Structure.
Definition: components.h:62
Definition: components.h:40
Menu State.
File Entry Structure.
Definition: menu_state.h:57
Menu Structure.
Definition: menu_state.h:64