|
102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
|
Go to the source code of this file.
Data Structures | |
| struct | config_path_picker_button |
| struct | config_theme_color |
Typedefs | |
| typedef void(* | config_path_dialog_fn) (const DTTR_ImGuiDialogContext *ctx, config_ui_state *state) |
Variables | |
| static const char *const | FOOTER_HINT_TEXT = "Ctrl+S to save your changes." |
| static const config_theme_color | CONFIG_THEME_COLORS [] |
| typedef void(* config_path_dialog_fn) (const DTTR_ImGuiDialogContext *ctx, config_ui_state *state) |
Definition at line 16 of file gui_widgets.c.
| void add_scaled_vertical_spacing | ( | const DTTR_ImGuiDialogContext * | ctx, |
| float | height ) |
Definition at line 12 of file gui_widgets.c.
References ctx, and DTTR_ImGuiDialog_ScaledFloat().
Referenced by draw_gamepad_buttons(), draw_mod_section_header(), draw_modding_tab(), and draw_ui().
|
static |
Definition at line 437 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_HEADER_TEXT_INSET_X, DTTR_ImGuiDialog_ScaledFloat(), and NULL.
Referenced by begin_gamepad_button_table(), and begin_settings_table_with_cell_padding().
| bool begin_config_content_region | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const config_ui_state * | state ) |
Definition at line 333 of file gui_widgets.c.
References config_footer_height(), ctx, and state.
Referenced by draw_ui().
|
static |
Definition at line 398 of file gui_widgets.c.
References CONFIG_TABLE_FLAGS, ctx, and table_cell_padding().
Referenced by begin_gamepad_button_table(), and begin_settings_table_with_cell_padding().
| void begin_config_table_row | ( | ) |
Definition at line 575 of file gui_widgets.c.
Referenced by begin_setting_row(), draw_gamepad_button_row(), and draw_mod_toggle_row().
| bool begin_gamepad_button_table | ( | const DTTR_ImGuiDialogContext * | ctx | ) |
Definition at line 524 of file gui_widgets.c.
References append_table_header_text(), begin_config_table(), begin_table_header_row(), config_standard_input_width(), ctx, DTTR_CONFIG_UI_GAMEPAD_BUTTON_W, DTTR_CONFIG_UI_GAMEPAD_SOURCE_W, DTTR_CONFIG_UI_TABLE_CELL_PADDING_X, and setup_scaled_table_column().
Referenced by draw_gamepad_buttons().
|
static |
Definition at line 626 of file gui_widgets.c.
References ctx, draw_config_label(), and table_input_width().
Referenced by labeled_checkbox(), labeled_choice_combo(), labeled_input_float(), labeled_input_int(), labeled_input_text(), and labeled_path_picker_with_dialog().
| bool begin_padded_panel | ( | const DTTR_ImGuiDialogContext * | ctx | ) |
Definition at line 363 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_ITEM_SPACING_X, DTTR_CONFIG_UI_ITEM_SPACING_Y, DTTR_CONFIG_UI_PANEL_PADDING_X, DTTR_CONFIG_UI_PANEL_PADDING_Y, and DTTR_ImGuiDialog_ScaledFloat().
Referenced by draw_ui().
| void begin_setting_row | ( | ) |
Definition at line 577 of file gui_widgets.c.
References begin_config_table_row().
Referenced by labeled_checkbox(), labeled_choice_combo(), labeled_input_float(), labeled_input_int(), labeled_input_text(), and labeled_path_picker_with_dialog().
| bool begin_settings_table | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | id, | ||
| float | label_width, | ||
| float | input_width ) |
Definition at line 510 of file gui_widgets.c.
References begin_settings_table_with_width(), and ctx.
Referenced by begin_tab_settings_table(), and draw_gamepad_axes().
|
static |
Definition at line 462 of file gui_widgets.c.
References append_table_header_text(), begin_config_table(), begin_table_header_row(), ctx, and setup_scaled_table_column().
Referenced by begin_settings_table_with_width().
| bool begin_settings_table_with_width | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | id, | ||
| float | label_width, | ||
| float | input_width, | ||
| float | table_width ) |
Definition at line 493 of file gui_widgets.c.
References begin_settings_table_with_cell_padding(), ctx, and DTTR_CONFIG_UI_TABLE_CELL_PADDING_X.
Referenced by begin_settings_table().
|
static |
Definition at line 453 of file gui_widgets.c.
Referenced by begin_gamepad_button_table(), and begin_settings_table_with_cell_padding().
| bool choice_combo | ( | const char * | label, |
| int * | value, | ||
| DTTR_ConfigChoiceList | choices, | ||
| const char *const * | tooltips ) |
Definition at line 68 of file gui_widgets.c.
References choice_index(), DTTR_Config_Choices(), DTTR_CONFIG_UI_COMBO_POPUP_PADDING_Y, DTTR_ConfigChoice::label, NULL, show_tooltip(), and DTTR_ConfigChoice::value.
Referenced by labeled_choice_combo().
|
static |
Definition at line 58 of file gui_widgets.c.
Referenced by choice_combo().
| float config_footer_height | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const config_ui_state * | state ) |
Definition at line 318 of file gui_widgets.c.
References ctx, format_status_text(), state, and status_text_height().
Referenced by begin_config_content_region().
|
static |
Definition at line 44 of file gui_widgets.c.
References config_standard_input_width(), DTTR_CONFIG_UI_GAMEPAD_BUTTON_W, DTTR_CONFIG_UI_GAMEPAD_SOURCE_W, and DTTR_CONFIG_UI_PATH_BUTTON_SPACING.
Referenced by config_window_width().
|
static |
Definition at line 600 of file gui_widgets.c.
References CONFIG_LABEL_DEFAULT, CONFIG_LABEL_SAVED_CHANGED, CONFIG_LABEL_UNSAVED, DTTR_CONFIG_UI_CHANGED_LABEL_TEXT_COLOR, DTTR_CONFIG_UI_LABEL_TEXT_COLOR, and DTTR_CONFIG_UI_SAVED_CHANGED_LABEL_TEXT_COLOR.
Referenced by draw_config_label().
|
static |
Definition at line 30 of file gui_widgets.c.
References DTTR_CONFIG_UI_PATH_BUTTON_SPACING, DTTR_CONFIG_UI_PATH_BUTTON_W, and DTTR_CONFIG_UI_PATH_INPUT_W.
Referenced by config_standard_input_width().
|
static |
Definition at line 40 of file gui_widgets.c.
References config_standard_input_width(), and DTTR_CONFIG_UI_LABEL_W.
Referenced by config_window_width().
| float config_standard_input_width | ( | ) |
Definition at line 36 of file gui_widgets.c.
References config_path_control_width(), and DTTR_CONFIG_UI_INPUT_W.
Referenced by begin_gamepad_button_table(), config_gamepad_content_width(), config_standard_content_width(), and draw_general_tab().
| int config_window_width | ( | ) |
Definition at line 50 of file gui_widgets.c.
References config_gamepad_content_width(), config_standard_content_width(), and DTTR_CONFIG_UI_PANEL_PADDING_X.
Referenced by dttr_config_main().
| void draw_config_label | ( | const char * | label, |
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 612 of file gui_widgets.c.
References config_label_text_color(), CONFIG_LABEL_UNSAVED, and show_tooltip().
Referenced by begin_labeled_control(), and draw_gamepad_button_row().
|
static |
Definition at line 130 of file gui_widgets.c.
References DTTR_CONFIG_UI_TOOLTIP_DEFAULT_TEXT_COLOR.
Referenced by draw_default_tooltip_value().
|
static |
Definition at line 144 of file gui_widgets.c.
References draw_default_inline_text(), and draw_inline_tooltip_segment().
Referenced by show_tooltip().
| void draw_footer_text | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const config_ui_state * | state ) |
Definition at line 350 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_HINT_TEXT_COLOR, DTTR_CONFIG_UI_STATUS_TEXT_COLOR, FOOTER_HINT_TEXT, format_status_text(), and state.
Referenced by draw_ui().
|
static |
Definition at line 121 of file gui_widgets.c.
Referenced by draw_default_tooltip_value().
|
static |
Definition at line 639 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_PATH_BUTTON_W, same_path_button_row(), show_tooltip(), state, and themed_row_button().
Referenced by draw_path_picker_buttons().
|
static |
Definition at line 656 of file gui_widgets.c.
References ctx, draw_path_picker_button(), and state.
Referenced by labeled_path_picker_with_dialog().
|
static |
Definition at line 113 of file gui_widgets.c.
Referenced by show_tooltip().
| void end_config_content_region | ( | ) |
Definition at line 348 of file gui_widgets.c.
Referenced by draw_ui().
| void end_padded_panel | ( | ) |
Definition at line 386 of file gui_widgets.c.
Referenced by draw_ui().
| void end_settings_table | ( | ) |
Definition at line 519 of file gui_widgets.c.
Referenced by draw_audio_tab(), draw_gamepad_axes(), draw_gamepad_buttons(), draw_general_tab(), draw_graphics_tab(), and draw_modding_tab().
|
static |
Definition at line 273 of file gui_widgets.c.
References config_has_unsaved_changes(), and state.
Referenced by config_footer_height(), and draw_footer_text().
| bool labeled_checkbox | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | label, | ||
| const char * | id, | ||
| bool * | value, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 840 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), ctx, DTTR_CONFIG_UI_INPUT_W, and show_tooltip().
Referenced by draw_gamepad_axes(), draw_general_tab(), draw_graphics_tab(), and draw_modding_tab().
| bool labeled_choice_combo | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | label, | ||
| const char * | id, | ||
| int * | value, | ||
| DTTR_ConfigChoiceList | choices, | ||
| const char *const * | tooltips, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 855 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), choice_combo(), ctx, DTTR_CONFIG_UI_INPUT_W, and show_tooltip().
Referenced by draw_gamepad_axis_choice(), draw_general_tab(), and draw_graphics_tab().
| bool labeled_input_float | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | label, | ||
| const char * | id, | ||
| float * | value, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 818 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), ctx, DTTR_CONFIG_UI_INPUT_W, and show_tooltip().
Referenced by draw_audio_tab().
| bool labeled_input_int | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | label, | ||
| const char * | id, | ||
| int * | value, | ||
| int | step, | ||
| int | step_fast, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 801 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), ctx, DTTR_CONFIG_UI_INPUT_W, and show_tooltip().
Referenced by draw_gamepad_axes(), draw_gamepad_deadzone_input(), and draw_graphics_tab().
| bool labeled_input_text | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | label, | ||
| const char * | id, | ||
| char * | buf, | ||
| size_t | buf_size, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 706 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), ctx, DTTR_CONFIG_UI_INPUT_W, NULL, and show_tooltip().
Referenced by draw_general_tab().
| bool labeled_log_path_picker | ( | const DTTR_ImGuiDialogContext * | ctx, |
| config_ui_state * | state, | ||
| const char * | label, | ||
| const char * | id, | ||
| char * | buf, | ||
| size_t | buf_size, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 768 of file gui_widgets.c.
References ctx, labeled_path_picker_with_dialog(), open_log_file_dialog(), and state.
Referenced by draw_general_tab().
| bool labeled_path_picker | ( | const DTTR_ImGuiDialogContext * | ctx, |
| config_ui_state * | state, | ||
| const char * | label, | ||
| const char * | id, | ||
| char * | buf, | ||
| size_t | buf_size, | ||
| const char * | tooltip, | ||
| config_label_state | label_state ) |
Definition at line 729 of file gui_widgets.c.
References ctx, labeled_path_picker_with_dialog(), open_pcdogs_dir_dialog(), open_pcdogs_iso_dialog(), and state.
Referenced by draw_general_tab().
|
static |
Definition at line 678 of file gui_widgets.c.
References begin_labeled_control(), begin_setting_row(), ctx, draw_path_picker_buttons(), DTTR_CONFIG_UI_PATH_INPUT_W, NULL, path_text_input_width(), show_tooltip(), and state.
Referenced by labeled_log_path_picker(), and labeled_path_picker().
| float path_text_input_width | ( | const DTTR_ImGuiDialogContext * | ctx, |
| int | button_count ) |
Definition at line 587 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_PATH_BUTTON_SPACING, DTTR_CONFIG_UI_PATH_BUTTON_W, DTTR_CONFIG_UI_PATH_INPUT_W, DTTR_ImGuiDialog_ScaledFloat(), and table_input_width().
Referenced by labeled_path_picker_with_dialog().
| void pop_config_theme | ( | ) |
Definition at line 271 of file gui_widgets.c.
References CONFIG_THEME_COLORS.
Referenced by draw_ui().
| void push_config_theme | ( | ) |
Definition at line 265 of file gui_widgets.c.
References color, CONFIG_THEME_COLORS, and target.
Referenced by draw_ui().
| void same_path_button_row | ( | const DTTR_ImGuiDialogContext * | ctx | ) |
Definition at line 5 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_PATH_BUTTON_SPACING, and DTTR_ImGuiDialog_ScaledFloat().
Referenced by draw_path_picker_button().
|
static |
Definition at line 428 of file gui_widgets.c.
References ctx, DTTR_ImGuiDialog_ScaledFloat(), and flags.
Referenced by begin_gamepad_button_table(), and begin_settings_table_with_cell_padding().
| void show_tooltip | ( | const char * | text | ) |
Definition at line 166 of file gui_widgets.c.
References draw_default_tooltip_value(), draw_wrapped_tooltip_segment(), DTTR_CONFIG_UI_TOOLTIP_PADDING_Y, DTTR_CONFIG_UI_TOOLTIP_WRAP_W, and NULL.
Referenced by choice_combo(), draw_config_label(), draw_gamepad_button_row(), draw_gamepad_buttons(), draw_mod_section_header(), draw_mod_toggle_row(), draw_path_picker_button(), labeled_checkbox(), labeled_choice_combo(), labeled_input_float(), labeled_input_int(), labeled_input_text(), and labeled_path_picker_with_dialog().
|
static |
Definition at line 301 of file gui_widgets.c.
References float.
Referenced by config_footer_height().
|
static |
Definition at line 391 of file gui_widgets.c.
References ctx, DTTR_CONFIG_UI_TABLE_CELL_PADDING_Y, and DTTR_ImGuiDialog_ScaledFloat().
Referenced by begin_config_table().
| float table_input_width | ( | const DTTR_ImGuiDialogContext * | ctx, |
| float | input_width ) |
Definition at line 582 of file gui_widgets.c.
References ctx, and DTTR_ImGuiDialog_ScaledFloat().
Referenced by begin_labeled_control(), and path_text_input_width().
| bool themed_row_button | ( | const DTTR_ImGuiDialogContext * | ctx, |
| const char * | id, | ||
| const char * | label, | ||
| float | width ) |
Definition at line 221 of file gui_widgets.c.
References ctx, DTTR_ImGuiDialog_Button(), DTTR_ImGuiDialog_ScaledFloat(), and size.
Referenced by draw_gamepad_button_row(), and draw_path_picker_button().
|
static |
Definition at line 240 of file gui_widgets.c.
Referenced by pop_config_theme(), and push_config_theme().
|
static |
Definition at line 28 of file gui_widgets.c.
Referenced by draw_footer_text().