|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include <stdbool.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | DTTR_LoaderUIDiscCandidate |
Typedefs | |
| typedef enum DTTR_LoaderUIChoice | DTTR_LoaderUIChoice |
| typedef struct DTTR_LoaderUIDiscCandidate | DTTR_LoaderUIDiscCandidate |
Enumerations | |
| enum | { DTTR_LOADER_UI_MAX_DISC_CANDIDATES = 8 , DTTR_LOADER_UI_CHOICE_DISC_BASE = 100 } |
| enum | DTTR_LoaderUIChoice { DTTR_LOADER_UI_CHOICE_EXIT = 0 , DTTR_LOADER_UI_CHOICE_BROWSE_FOLDER = 1 , DTTR_LOADER_UI_CHOICE_BROWSE_ISO = 2 } |
Functions | |
| DTTR_LoaderUIChoice | DTTR_LoaderUI_ChoiceFromID (int choice_id) |
| bool | DTTR_LoaderUI_ChoiceIsBrowse (DTTR_LoaderUIChoice choice) |
| DTTR_LoaderUIChoice | DTTR_LoaderUI_DiscChoiceForIndex (size_t index) |
| bool | DTTR_LoaderUI_ChoiceIsDisc (DTTR_LoaderUIChoice choice, size_t *out_index) |
| DTTR_LoaderUIChoice | DTTR_LoaderUI_ChooseGameSource (const DTTR_LoaderUIDiscCandidate *disc_candidates, size_t disc_candidate_count) |
| void | DTTR_LoaderUI_ShowError (const char *title, const char *message) |
| typedef enum DTTR_LoaderUIChoice DTTR_LoaderUIChoice |
| typedef struct DTTR_LoaderUIDiscCandidate DTTR_LoaderUIDiscCandidate |
| anonymous enum |
| Enumerator | |
|---|---|
| DTTR_LOADER_UI_MAX_DISC_CANDIDATES | |
| DTTR_LOADER_UI_CHOICE_DISC_BASE | |
Definition at line 11 of file dttr_loader_ui.h.
| enum DTTR_LoaderUIChoice |
| Enumerator | |
|---|---|
| DTTR_LOADER_UI_CHOICE_EXIT | |
| DTTR_LOADER_UI_CHOICE_BROWSE_FOLDER | |
| DTTR_LOADER_UI_CHOICE_BROWSE_ISO | |
Definition at line 16 of file dttr_loader_ui.h.
| DTTR_LoaderUIChoice DTTR_LoaderUI_ChoiceFromID | ( | int | choice_id | ) |
Definition at line 21 of file ui_logic.c.
References DTTR_LOADER_UI_CHOICE_EXIT, DTTR_LoaderUI_ChoiceIsBrowse(), DTTR_LoaderUI_ChoiceIsDisc(), and NULL.
Referenced by native_choose_game_source().
| bool DTTR_LoaderUI_ChoiceIsBrowse | ( | DTTR_LoaderUIChoice | choice | ) |
Definition at line 3 of file ui_logic.c.
References DTTR_LOADER_UI_CHOICE_BROWSE_FOLDER, and DTTR_LOADER_UI_CHOICE_BROWSE_ISO.
Referenced by DTTR_LoaderUI_ChoiceFromID(), and prompt_browse_for_path().
| bool DTTR_LoaderUI_ChoiceIsDisc | ( | DTTR_LoaderUIChoice | choice, |
| size_t * | out_index ) |
Definition at line 8 of file ui_logic.c.
References DTTR_LOADER_UI_CHOICE_DISC_BASE, and DTTR_LOADER_UI_MAX_DISC_CANDIDATES.
Referenced by DTTR_LoaderUI_ChoiceFromID(), and prompt_browse_for_path().
| DTTR_LoaderUIChoice DTTR_LoaderUI_ChooseGameSource | ( | const DTTR_LoaderUIDiscCandidate * | disc_candidates, |
| size_t | disc_candidate_count ) |
Definition at line 182 of file ui.c.
References clamp_disc_candidate_count(), ctx, draw_source_buttons(), DTTR_ImGuiDialog_Begin(), DTTR_ImGuiDialog_BeginRoot(), DTTR_ImGuiDialog_DrawHeader(), DTTR_ImGuiDialog_DrawPaddedText(), DTTR_ImGuiDialog_End(), DTTR_ImGuiDialog_EndRoot(), DTTR_ImGuiDialog_FitWindowToContent(), DTTR_ImGuiDialog_NewFrame(), DTTR_ImGuiDialog_ProcessEvents(), DTTR_ImGuiDialog_RefreshScale(), DTTR_ImGuiDialog_Render(), DTTR_LOADER_UI_CHOICE_EXIT, DTTR_LOADER_UI_TEXT_PADDING_X, DTTR_LOADER_UI_TEXT_PADDING_Y, DTTR_LOADER_UI_WINDOW_H, DTTR_LOADER_UI_WINDOW_W, DTTR_VERSION, GAME_SOURCE_MESSAGE, HEADER_TITLE, native_choose_game_source(), and WINDOW_TITLE.
Referenced by prompt_browse_for_path().
| DTTR_LoaderUIChoice DTTR_LoaderUI_DiscChoiceForIndex | ( | size_t | index | ) |
Definition at line 34 of file ui_logic.c.
References DTTR_LOADER_UI_CHOICE_DISC_BASE, DTTR_LOADER_UI_CHOICE_EXIT, and DTTR_LOADER_UI_MAX_DISC_CANDIDATES.
Referenced by draw_disc_button().
| void DTTR_LoaderUI_ShowError | ( | const char * | title, |
| const char * | message ) |
Definition at line 236 of file ui.c.
References DTTR_ImGui_ErrorShow(), DTTR_SDL_ShowSimpleMessageBox(), ERROR_TITLE, NULL, and window_title.
Referenced by dttr_launcher_main(), resolve_iso(), try_browsed_path(), and try_disc_candidate().