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 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);
49 struct component_context_menu *submenu;
50 } list[];
52
53#define COMPONENT_CONTEXT_MENU_LIST_END { .text = NULL }
54
55void component_context_menu_init (component_context_menu_t *cm);
56void component_context_menu_show (component_context_menu_t *cm);
57bool component_context_menu_process (menu_t *menu, component_context_menu_t *cm);
58void component_context_menu_draw (component_context_menu_t *cm);
59
61typedef struct {
62 bool loading;
63 surface_t *image;
65
66component_boxart_t *component_boxart_init (char *game_code);
67void component_boxart_free (component_boxart_t *b);
68void component_boxart_draw (component_boxart_t *b);
69 /* menu_components */
71
72
73#endif
Box Art Structure.
Definition: components.h:61
Definition: components.h:40
Menu State.
File Entry Structure.
Definition: menu_state.h:57
Menu Structure.
Definition: menu_state.h:64