|
N64FlashcartMenu
|
Menu Graphical User Interface Components. More...
Go to the source code of this file.
Data Structures | |
| struct | file_info_t |
| File information Structure. More... | |
| struct | component_context_menu_t |
| Context menu structure. More... | |
| struct | component_boxart_t |
| Box Art Structure. More... | |
| struct | component_context_menu_t.list |
Macros | |
| #define | COMPONENT_CONTEXT_MENU_LIST_END { .text = NULL } |
Enumerations | |
| enum | file_image_type_t { IMAGE_BOXART_FRONT , IMAGE_BOXART_BACK , IMAGE_BOXART_TOP , IMAGE_BOXART_BOTTOM , IMAGE_BOXART_LEFT , IMAGE_BOXART_RIGHT , IMAGE_GAMEPAK_FRONT , IMAGE_GAMEPAK_BACK , IMAGE_THUMBNAIL , IMAGE_TYPE_END } |
| File image Enumeration. More... | |
Functions | |
| void | ui_components_box_draw (int x0, int y0, int x1, int y1, color_t color) |
| Draw a box component. | |
| void | ui_components_border_draw (int x0, int y0, int x1, int y1) |
| Draw a border component. | |
| void | ui_components_layout_draw_tabbed (void) |
| Draw the layout component with tabs. | |
| void | ui_components_layout_draw (void) |
| Draw the layout component. | |
| void | ui_components_progressbar_draw (int x0, int y0, int x1, int y1, float progress) |
| Draw a progress bar component. | |
| void | ui_components_seekbar_draw (float progress) |
| Draw a seek bar component. | |
| void | ui_components_loader_draw (float progress, const char *msg) |
| Draw a loader component. | |
| void | ui_components_scrollbar_draw (int x, int y, int width, int height, int position, int items, int visible_items) |
| Draw a scrollbar component. | |
| void | ui_components_list_scrollbar_draw (int position, int items, int visible_items) |
| Draw a list scrollbar component. | |
| void | ui_components_dialog_draw (int width, int height) |
| Draw a dialog component. | |
| void | ui_components_messagebox_draw (char *fmt,...) |
| Draw a message box component. | |
| void | ui_components_main_text_draw (menu_font_type_t style, rdpq_align_t align, rdpq_valign_t valign, char *fmt,...) |
| Draw the main text component. | |
| void | ui_components_actions_bar_text_draw (menu_font_type_t style, rdpq_align_t align, rdpq_valign_t valign, char *fmt,...) |
| Draw the actions bar text component. | |
| void | ui_components_background_init (char *cache_location) |
| Initialize the background component. | |
| void | ui_components_background_free (void) |
| Free the background component resources. | |
| void | ui_components_background_replace_image (surface_t *image) |
| Replace the background image. | |
| void | ui_components_background_draw (void) |
| Draw the background component. | |
| void | ui_components_file_list_draw (entry_t *list, int entries, int selected) |
| Draw the file list component. | |
| void | ui_components_context_menu_init (component_context_menu_t *cm) |
| Initialize the context menu component. | |
| void | ui_components_context_menu_show (component_context_menu_t *cm) |
| Show the context menu component. | |
| bool | ui_components_context_menu_process (menu_t *menu, component_context_menu_t *cm) |
| Process the context menu component. | |
| void | ui_components_context_menu_draw (component_context_menu_t *cm) |
| Draw the context menu component. | |
| component_boxart_t * | ui_components_boxart_init (const char *storage_prefix, const char *game_code, const char *rom_title, file_image_type_t current_image_view) |
| Initialize the box art component. | |
| void | ui_components_boxart_free (component_boxart_t *b) |
| Free the box art component resources. | |
| void | ui_components_boxart_draw (component_boxart_t *b) |
| Draw the box art component. | |
| void | ui_components_tabs_draw (const char **text, int count, int selected, float width) |
| Draw the tabs component. | |
| void | ui_components_tabs_common_draw (int selected) |
| Draw the common part of the tabs component. | |
| void | ui_component_value_editor (const char **header_text, const char **value_text, int count, int selected, float width_adjustment) |
| Draw a value editor component. | |
| void | ui_components_file_info_draw (char *filename, file_info_t *info) |
| Draw the file info component. | |
Menu Graphical User Interface Components.
| struct file_info_t |
File information Structure.
Structure with file information displayed used in the user interface.
| struct component_context_menu_t |
Context menu structure.
| Data Fields | ||
|---|---|---|
| int | row_count |
Number of rows in the context menu |
| int | row_selected |
Index of the selected row |
| bool | hide_pending |
Flag to indicate if hiding is pending |
| struct component_context_menu * | parent |
Pointer to the parent context menu |
| struct component_context_menu * | submenu |
Pointer to the submenu |
| struct component_context_menu_t.list | list[] |
List of menu items |
| struct component_boxart_t |
| struct component_context_menu_t.list |
| #define COMPONENT_CONTEXT_MENU_LIST_END { .text = NULL } |
End marker for the context menu list
| enum file_image_type_t |
File image Enumeration.
Enumeration for different types of file images used in the user interface.
| void ui_components_box_draw | ( | int | x0, |
| int | y0, | ||
| int | x1, | ||
| int | y1, | ||
| color_t | color ) |
Draw a box component.
| x0 | Starting x-coordinate. |
| y0 | Starting y-coordinate. |
| x1 | Ending x-coordinate. |
| y1 | Ending y-coordinate. |
| color | Color of the box. |
Draw a box component.
| x0 | The x-coordinate of the top-left corner. |
| y0 | The y-coordinate of the top-left corner. |
| x1 | The x-coordinate of the bottom-right corner. |
| y1 | The y-coordinate of the bottom-right corner. |
| color | The color of the box. |
| void ui_components_border_draw | ( | int | x0, |
| int | y0, | ||
| int | x1, | ||
| int | y1 ) |
Draw a border component.
| x0 | Starting x-coordinate. |
| y0 | Starting y-coordinate. |
| x1 | Ending x-coordinate. |
| y1 | Ending y-coordinate. |
Draw a border component.
| x0 | The x-coordinate of the top-left corner. |
| y0 | The y-coordinate of the top-left corner. |
| x1 | The x-coordinate of the bottom-right corner. |
| y1 | The y-coordinate of the bottom-right corner. |
| void ui_components_layout_draw_tabbed | ( | void | ) |
Draw the layout component with tabs.
Draw the layout component with tabs.
| void ui_components_layout_draw | ( | void | ) |
Draw the layout component.
Draw the layout component.
| void ui_components_progressbar_draw | ( | int | x0, |
| int | y0, | ||
| int | x1, | ||
| int | y1, | ||
| float | progress ) |
Draw a progress bar component.
| x0 | Starting x-coordinate. |
| y0 | Starting y-coordinate. |
| x1 | Ending x-coordinate. |
| y1 | Ending y-coordinate. |
| progress | Progress value (0.0 to 1.0). |
Draw a progress bar component.
| x0 | The x-coordinate of the top-left corner. |
| y0 | The y-coordinate of the top-left corner. |
| x1 | The x-coordinate of the bottom-right corner. |
| y1 | The y-coordinate of the bottom-right corner. |
| progress | The progress value (0.0 to 1.0). |
| void ui_components_seekbar_draw | ( | float | position | ) |
Draw a seek bar component.
| progress | Progress value (0.0 to 1.0). |
Draw a seek bar component.
| position | The position value (0.0 to 1.0). |
| void ui_components_loader_draw | ( | float | progress, |
| const char * | msg ) |
Draw a loader component.
| position | Position value (0.0 to 1.0). |
| msg | Message to display, truncated to 30 characters. |
Draw a loader component.
| progress | The progress value (0.0 to 1.0). |
| msg | The message to display truncated to 30 characters. |
| void ui_components_scrollbar_draw | ( | int | x, |
| int | y, | ||
| int | width, | ||
| int | height, | ||
| int | position, | ||
| int | items, | ||
| int | visible_items ) |
Draw a scrollbar component.
| x | Starting x-coordinate. |
| y | Starting y-coordinate. |
| width | Width of the scrollbar. |
| height | Height of the scrollbar. |
| position | Current position. |
| items | Total number of items. |
| visible_items | Number of visible items. |
Draw a scrollbar component.
| x | The x-coordinate of the top-left corner. |
| y | The y-coordinate of the top-left corner. |
| width | The width of the scrollbar. |
| height | The height of the scrollbar. |
| position | The current position. |
| items | The total number of items. |
| visible_items | The number of visible items. |
| void ui_components_list_scrollbar_draw | ( | int | position, |
| int | items, | ||
| int | visible_items ) |
Draw a list scrollbar component.
| position | Current position. |
| items | Total number of items. |
| visible_items | Number of visible items. |
Draw a list scrollbar component.
| position | The current position. |
| items | The total number of items. |
| visible_items | The number of visible items. |
| void ui_components_dialog_draw | ( | int | width, |
| int | height ) |
Draw a dialog component.
| width | Width of the dialog. |
| height | Height of the dialog. |
Draw a dialog component.
| width | The width of the dialog box. |
| height | The height of the dialog box. |
| void ui_components_messagebox_draw | ( | char * | fmt, |
| ... ) |
Draw a message box component.
| fmt | Format string for the message. |
| ... | Additional arguments for the format string. |
Draw a message box component.
| fmt | The format string. |
| ... | The format arguments. |
| void ui_components_main_text_draw | ( | menu_font_type_t | style, |
| rdpq_align_t | align, | ||
| rdpq_valign_t | valign, | ||
| char * | fmt, | ||
| ... ) |
Draw the main text component.
| style | The font style. |
| align | Horizontal alignment. |
| valign | Vertical alignment. |
| fmt | Format string for the text. |
| ... | Additional arguments for the format string. |
Draw the main text component.
| style | The font style. |
| align | The horizontal alignment. |
| valign | The vertical alignment. |
| fmt | The format string. |
| ... | The format arguments. |
| void ui_components_actions_bar_text_draw | ( | menu_font_type_t | style, |
| rdpq_align_t | align, | ||
| rdpq_valign_t | valign, | ||
| char * | fmt, | ||
| ... ) |
Draw the actions bar text component.
| style | The font style. |
| align | Horizontal alignment. |
| valign | Vertical alignment. |
| fmt | Format string for the text. |
| ... | Additional arguments for the format string. |
Draw the actions bar text component.
| style | The font style. |
| align | The horizontal alignment. |
| valign | The vertical alignment. |
| fmt | The format string. |
| ... | The format arguments. |
| void ui_components_background_init | ( | char * | cache_location | ) |
Initialize the background component.
| cache_location | Location of the cache. |
Initialize the background component.
| cache_location | Path to the cache file location. |
| void ui_components_background_free | ( | void | ) |
Free the background component resources.
Free the background component resources.
| void ui_components_background_replace_image | ( | surface_t * | image | ) |
Replace the background image.
| image | New background image. |
Replace the background image.
| image | Pointer to the new background image surface. |
| void ui_components_background_draw | ( | void | ) |
Draw the background component.
Draw the background component.
| void ui_components_file_list_draw | ( | entry_t * | list, |
| int | entries, | ||
| int | selected ) |
Draw the file list component.
| list | List of entries. |
| entries | Number of entries. |
| selected | Index of the selected entry. |
Draw the file list component.
| list | Pointer to the list of file entries. |
| entries | Number of entries in the list. |
| selected | Index of the currently selected entry. |
| void ui_components_context_menu_init | ( | component_context_menu_t * | cm | ) |
Initialize the context menu component.
| cm | Pointer to the context menu structure. |
| cm | Pointer to the context menu component. |
| void ui_components_context_menu_show | ( | component_context_menu_t * | cm | ) |
Show the context menu component.
| cm | Pointer to the context menu structure. |
Show the context menu component.
| cm | Pointer to the context menu component. |
| bool ui_components_context_menu_process | ( | menu_t * | menu, |
| component_context_menu_t * | cm ) |
Process the context menu component.
| menu | Pointer to the menu structure. |
| cm | Pointer to the context menu structure. |
Process the context menu component.
| menu | Pointer to the menu structure. |
| cm | Pointer to the context menu component. |
| void ui_components_context_menu_draw | ( | component_context_menu_t * | cm | ) |
Draw the context menu component.
| cm | Pointer to the context menu structure. |
Draw the context menu component.
| cm | Pointer to the context menu component. |
| component_boxart_t * ui_components_boxart_init | ( | const char * | storage_prefix, |
| const char * | game_code, | ||
| const char * | rom_title, | ||
| file_image_type_t | current_image_view ) |
Initialize the box art component.
| storage_prefix | Prefix for the storage location. |
| game_code | Game code for the box art. |
| rom_title | Title of the ROM (may be NULL). If used, it is sanitized for filesystem safety. |
| current_image_view | Current image view type. |
Initialize the box art component.
Attempts to locate and load the appropriate boxart image for the given game code and ROM title.
| storage_prefix | The storage prefix (e.g., SD card root). |
| game_code | The 4-character game code. |
| rom_title | Title of the ROM (may be NULL). If used, it is sanitized for filesystem safety. |
| current_image_view | The current image view type (front, back, etc.). |
| void ui_components_boxart_free | ( | component_boxart_t * | b | ) |
Free the box art component resources.
| b | Pointer to the box art component. |
Free the box art component resources.
| b | Pointer to the boxart component. |
| void ui_components_boxart_draw | ( | component_boxart_t * | b | ) |
Draw the box art component.
| b | Pointer to the box art component. |
Draw the box art component.
Draws the loaded boxart image at the appropriate position, or a placeholder if not loaded.
| b | Pointer to the boxart component. |
| void ui_components_tabs_draw | ( | const char ** | text, |
| int | count, | ||
| int | selected, | ||
| float | width ) |
Draw the tabs component.
| text | Array of tab labels. |
| count | Number of tabs. |
| selected | Index of the selected tab. |
| width | Width of the tabs. |
Draw the tabs component.
| text | Array of tab text. |
| count | Number of tabs. |
| selected | Index of the selected tab. |
| width | Width of each tab. |
| void ui_components_tabs_common_draw | ( | int | selected | ) |
Draw the common part of the tabs component.
| selected | Index of the selected tab. |
Draw the common part of the tabs component.
| selected | Index of the currently selected tab. |
| void ui_component_value_editor | ( | const char ** | header_text, |
| const char ** | value_text, | ||
| int | count, | ||
| int | selected, | ||
| float | width_adjustment ) |
Draw a value editor component.
| header_text | Array of header text for the values. |
| value_text | Array of value text to be displayed. |
| count | Number of values. |
| selected | Index of the selected value. |
| width_adjustment | Negative width adjustment of each value box. |
| void ui_components_file_info_draw | ( | char * | filename, |
| file_info_t * | info ) |
Draw the file info component.
| filename | Name of the file for which to show the information. |
| info | Metadata information of the file to be displayed. |
Draw the file info component.
| filename | Name of the file to display information for. |
| info | Pointer to the file information structure. |