|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
#include "gui_internal.h"Go to the source code of this file.
Variables | |
| static const char *const | GAME_ACTION_TOOLTIPS [] |
|
static |
Definition at line 47 of file gui_state.c.
References PCDOGS_GAMEPAD_IDX_BTN_12, and PCDOGS_GAMEPAD_IDX_UP.
Referenced by source_for_action().
|
static |
Definition at line 38 of file gui_state.c.
References DTTR_GAMEPAD_SOURCE_COUNT, and source.
Referenced by capture_source(), and sync_config_from_rows().
| void cancel_binding | ( | config_ui_state * | state | ) |
Definition at line 140 of file gui_state.c.
References set_status(), and state.
Referenced by process_events().
| void capture_source | ( | config_ui_state * | state, |
| int | new_source ) |
Definition at line 149 of file gui_state.c.
References button_source_in_range(), gamepad_button_row_count(), set_status(), and state.
Referenced by process_events().
|
static |
Definition at line 36 of file gui_state.c.
References state.
Referenced by set_mods_dir_from_config_path().
| bool config_has_unsaved_changes | ( | const config_ui_state * | state | ) |
Definition at line 286 of file gui_state.c.
References DTTR_Config_DisabledModsChanged(), DTTR_Config_SchemaChanged(), gamepad_button_rows_have_unsaved_changes(), and state.
Referenced by confirm_discard_changes(), and format_status_text().
| bool event_cancels_binding | ( | const SDL_Event * | event | ) |
| const char * game_action_tooltip | ( | int | action | ) |
Definition at line 26 of file gui_state.c.
References DTTR_GAMEPAD_MAPPING_NONE, and GAME_ACTION_TOOLTIPS.
Referenced by draw_gamepad_button_row().
| config_label_state gamepad_button_label_state | ( | const config_ui_state * | state, |
| int | source, | ||
| int | action ) |
Definition at line 269 of file gui_state.c.
References make_config_label_state(), source, source_for_action(), and state.
Referenced by draw_gamepad_button_row().
| int gamepad_button_row_action | ( | int | row | ) |
Definition at line 78 of file gui_state.c.
References DTTR_GAMEPAD_MAPPING_NONE, gamepad_button_row_choice(), and DTTR_ConfigChoice::value.
Referenced by sync_rows_from_config().
|
static |
Definition at line 70 of file gui_state.c.
References DTTR_Config_ChoiceGet(), DTTR_CONFIG_CHOICES_GAME_ACTION, gamepad_button_row_count(), and NULL.
Referenced by gamepad_button_row_action(), and gamepad_button_row_label().
| int gamepad_button_row_count | ( | ) |
Definition at line 65 of file gui_state.c.
References DTTR_Config_ChoiceCount(), and DTTR_CONFIG_CHOICES_GAME_ACTION.
Referenced by capture_source(), draw_gamepad_buttons(), gamepad_button_row_choice(), gamepad_button_rows_have_unsaved_changes(), sync_config_from_rows(), and sync_rows_from_config().
| const char * gamepad_button_row_label | ( | int | row | ) |
Definition at line 83 of file gui_state.c.
References gamepad_button_row_choice(), and DTTR_ConfigChoice::label.
Referenced by draw_gamepad_button_row(), and draw_gamepad_buttons().
| bool gamepad_button_rows_have_unsaved_changes | ( | const config_ui_state * | state | ) |
Definition at line 254 of file gui_state.c.
References gamepad_button_row_count(), source_for_action(), and state.
Referenced by config_has_unsaved_changes().
| int gamepad_default_source_for_action | ( | const config_ui_state * | state, |
| int | action ) |
Definition at line 88 of file gui_state.c.
References DTTR_GAMEPAD_MAPPING_NONE, source_for_action(), and state.
Referenced by draw_gamepad_button_row().
| void load_config | ( | config_ui_state * | state | ) |
Definition at line 185 of file gui_state.c.
References dttr_config, DTTR_Config_LastError(), DTTR_Config_Load(), refresh_button_rows(), set_status(), and state.
Referenced by draw_toolbar(), handle_shortcuts(), and init_state_from_args().
| config_label_state make_config_label_state | ( | bool | unsaved_changed, |
| bool | default_changed ) |
Definition at line 246 of file gui_state.c.
References CONFIG_LABEL_DEFAULT, CONFIG_LABEL_SAVED_CHANGED, and CONFIG_LABEL_UNSAVED.
Referenced by gamepad_axis_label_state(), gamepad_button_label_state(), and gamepad_deadzone_label_state().
|
static |
Definition at line 42 of file gui_state.c.
References state, and sync_rows_from_config().
Referenced by load_config(), and reset_defaults().
| void request_reset_defaults | ( | const DTTR_ImGuiDialogContext * | ctx, |
| config_ui_state * | state ) |
Definition at line 223 of file gui_state.c.
References ctx, DTTR_SDL_ShowMessageBox(), NULL, reset_defaults(), and state.
Referenced by draw_toolbar().
| void reset_defaults | ( | config_ui_state * | state | ) |
Definition at line 217 of file gui_state.c.
References DTTR_Config_SetDefaults(), refresh_button_rows(), set_status(), and state.
Referenced by request_reset_defaults().
| void save_config | ( | config_ui_state * | state | ) |
Definition at line 205 of file gui_state.c.
References DTTR_Config_Save(), set_status(), state, and sync_config_from_rows().
Referenced by draw_toolbar(), and handle_shortcuts().
| void set_mods_dir_from_config_path | ( | config_ui_state * | state | ) |
Definition at line 101 of file gui_state.c.
References clear_mods_dir(), DTTR_Path_AppendSegment(), DTTR_Path_CopySds(), DTTR_Path_ModuleDir(), DTTR_PATH_NATIVE_SEPARATOR, NULL, and state.
Referenced by init_state_from_args().
| void set_status | ( | config_ui_state * | state, |
| const char * | status ) |
Definition at line 96 of file gui_state.c.
References DTTR_CONFIG_UI_STATUS_TIMEOUT_MS, and state.
Referenced by apply_dialog_selection(), cancel_binding(), capture_source(), draw_gamepad_button_row(), draw_mod_toggle_row(), dttr_config_main(), load_config(), reset_defaults(), and save_config().
|
static |
Definition at line 51 of file gui_state.c.
References button_action_in_range(), DTTR_GAMEPAD_MAPPING_NONE, DTTR_GAMEPAD_SOURCE_COUNT, and source.
Referenced by gamepad_button_label_state(), gamepad_button_rows_have_unsaved_changes(), gamepad_default_source_for_action(), and sync_rows_from_config().
| void sync_config_from_rows | ( | config_ui_state * | state | ) |
Definition at line 172 of file gui_state.c.
References button_source_in_range(), DTTR_Config_ClearGamepadButtonMap(), gamepad_button_row_count(), source, and state.
Referenced by save_config().
| void sync_rows_from_config | ( | config_ui_state * | state | ) |
Definition at line 117 of file gui_state.c.
References DTTR_GAMEPAD_MAPPING_NONE, DTTR_GAMEPAD_SOURCE_COUNT, gamepad_button_row_action(), gamepad_button_row_count(), source_for_action(), and state.
Referenced by init_state_from_args(), and refresh_button_rows().
|
static |
Definition at line 3 of file gui_state.c.
Referenced by game_action_tooltip().