102 Patches: Detours to the Rescue
C reference for DttR maintainers and modders.
Loading...
Searching...
No Matches
gui_tab_general.c
Go to the documentation of this file.
1#include "gui_internal.h"
2
3static const char *const LOG_LEVEL_TOOLTIPS[] = {
4 "Logs every message, including detailed trace output.",
5 "Logs debug, info, warning, error, and fatal messages.",
6 "Logs normal runtime messages and higher-severity messages.",
7 "Logs warnings, errors, and fatal messages.",
8 "Logs errors and fatal messages only.",
9 "Logs only fatal messages.",
10};
11
12static const char *const MINIDUMP_TYPE_TOOLTIPS[] = {
13 "Writes a standard crash minidump.",
14 "Writes a larger crash minidump with additional details.",
15};
16
17static const char *TOOLTIP_PCDOGS_PATH = "Installed game directory or original ISO.";
18static const char *TOOLTIP_SAVES_PATH = "Redirect saves and logs under the DttR "
19 "directory. Use null or \"\" to disable. "
20 "Default: saves.";
21static const char *TOOLTIP_LOG_LEVEL = "Minimum log level. Default: info (release), "
22 "debug (debug).";
23static const char *TOOLTIP_LOG_FILE_PATH = "DttR log file path. Default: dttr.log.";
24static const char *TOOLTIP_MINIDUMP_TYPE = "Crash dump detail. Default: normal "
25 "(release), detailed (debug).";
26
27static const char *TOOLTIP_SHOW_CRASH_POPUP
28 = "Show a crash popup after writing the crash dump and logging the stack trace. "
29 "Turn this off to close immediately after a crash. Default: true.";
30
31static const char *TOOLTIP_SKIP_INTRO_MOVIES = "Skip Intro Movies at launch. Default: "
32 "false.";
33
36 ctx,
37 "##general_settings_table",
39 )) {
40 return;
41 }
42
44 ctx,
45 state,
46 "Game Directory or ISO",
47 "##pcdogs_path",
48 state->config.pcdogs_path,
49 sizeof(state->config.pcdogs_path),
51 PATH_FIELD_LABEL_STATE(state, pcdogs_path)
52 );
54 ctx,
55 "Saves Path",
56 "##saves_path",
57 state->config.saves_path,
58 sizeof(state->config.saves_path),
60 PATH_FIELD_LABEL_STATE(state, saves_path)
61 );
63 ctx,
64 state,
65 "Log File Path",
66 "##log_file_path",
67 state->config.log_file_path,
68 sizeof(state->config.log_file_path),
70 PATH_FIELD_LABEL_STATE(state, log_file_path)
71 );
73 ctx,
74 "Log Level",
75 "##log_level",
76 &state->config.log_level,
80 FIELD_LABEL_STATE(state, log_level)
81 );
83 ctx,
84 "Minidump Type",
85 "##minidump_type",
86 (int *)&state->config.minidump_type,
91 );
93 ctx,
94 "Show Crash Popup",
95 "##show_crash_popup",
96 &state->config.show_crash_popup,
98 FIELD_LABEL_STATE(state, show_crash_popup)
99 );
101 ctx,
102 "Skip Intro Movies",
103 "##skip_intro_movies",
104 &state->config.skip_intro_movies,
106 FIELD_LABEL_STATE(state, skip_intro_movies)
107 );
109}
const DTTR_BackendState * state
void void * ctx
static MINIDUMP_TYPE minidump_type()
Definition crashdump.c:391
@ DTTR_CONFIG_CHOICES_MINIDUMP_TYPE
@ DTTR_CONFIG_CHOICES_LOG_LEVEL
bool labeled_checkbox(const DTTR_ImGuiDialogContext *ctx, const char *label, const char *id, bool *value, const char *tooltip, config_label_state label_state)
#define PATH_FIELD_LABEL_STATE(state, field)
void end_settings_table()
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)
float config_standard_input_width()
Definition gui_widgets.c:36
#define FIELD_LABEL_STATE(state, field)
bool begin_tab_settings_table(const DTTR_ImGuiDialogContext *ctx, const char *id, float input_width)
Definition gui_tabs.c:13
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)
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)
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)
static const char * TOOLTIP_LOG_LEVEL
void draw_general_tab(const DTTR_ImGuiDialogContext *ctx, config_ui_state *state)
static const char * TOOLTIP_SAVES_PATH
static const char * TOOLTIP_SKIP_INTRO_MOVIES
static const char *const LOG_LEVEL_TOOLTIPS[]
static const char * TOOLTIP_MINIDUMP_TYPE
static const char *const MINIDUMP_TYPE_TOOLTIPS[]
static const char * TOOLTIP_SHOW_CRASH_POPUP
static const char * TOOLTIP_LOG_FILE_PATH
static const char * TOOLTIP_PCDOGS_PATH