mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-16 17:12:23 -07:00
new/save user/project commands
This commit is contained in:
@@ -60,7 +60,7 @@ str8_lit_comp(""),
|
||||
str8_lit_comp(""),
|
||||
};
|
||||
|
||||
RD_VocabInfo rd_vocab_info_table[336] =
|
||||
RD_VocabInfo rd_vocab_info_table[340] =
|
||||
{
|
||||
{str8_lit_comp("type_view"), str8_lit_comp("type_views"), str8_lit_comp("Type View"), str8_lit_comp("Type Views"), RD_IconKind_Binoculars},
|
||||
{str8_lit_comp("file_path_map"), str8_lit_comp("file_path_maps"), str8_lit_comp("File Path Map"), str8_lit_comp("File Path Maps"), RD_IconKind_FileOutline},
|
||||
@@ -267,9 +267,13 @@ RD_VocabInfo rd_vocab_info_table[336] =
|
||||
{str8_lit_comp("go_to_disassembly"), str8_lit_comp(""), str8_lit_comp("Go To Disassembly"), str8_lit_comp(""), RD_IconKind_Glasses},
|
||||
{str8_lit_comp("go_to_source"), str8_lit_comp(""), str8_lit_comp("Go To Source"), str8_lit_comp(""), RD_IconKind_FileOutline},
|
||||
{str8_lit_comp("set_file_replacement_path"), str8_lit_comp(""), str8_lit_comp("Set File Replacement Path"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("new_user"), str8_lit_comp(""), str8_lit_comp("New User"), str8_lit_comp(""), RD_IconKind_Add},
|
||||
{str8_lit_comp("new_project"), str8_lit_comp(""), str8_lit_comp("New Project"), str8_lit_comp(""), RD_IconKind_Add},
|
||||
{str8_lit_comp("open_user"), str8_lit_comp(""), str8_lit_comp("Open User"), str8_lit_comp(""), RD_IconKind_Person},
|
||||
{str8_lit_comp("open_project"), str8_lit_comp(""), str8_lit_comp("Open Project"), str8_lit_comp(""), RD_IconKind_Briefcase},
|
||||
{str8_lit_comp("open_recent_project"), str8_lit_comp(""), str8_lit_comp("Open Recent Project"), str8_lit_comp(""), RD_IconKind_Briefcase},
|
||||
{str8_lit_comp("save_user"), str8_lit_comp(""), str8_lit_comp("Save User"), str8_lit_comp(""), RD_IconKind_Save},
|
||||
{str8_lit_comp("save_project"), str8_lit_comp(""), str8_lit_comp("Save Project"), str8_lit_comp(""), RD_IconKind_Save},
|
||||
{str8_lit_comp("write_user_data"), str8_lit_comp(""), str8_lit_comp("Write User Data"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("write_project_data"), str8_lit_comp(""), str8_lit_comp("Write Project Data"), str8_lit_comp(""), RD_IconKind_Null},
|
||||
{str8_lit_comp("user_settings"), str8_lit_comp(""), str8_lit_comp("User Settings"), str8_lit_comp(""), RD_IconKind_Gear},
|
||||
@@ -475,7 +479,7 @@ Rng1U64 rd_reg_slot_range_table[43] =
|
||||
{OffsetOf(RD_Regs, os_event), OffsetOf(RD_Regs, os_event) + sizeof(OS_Event *)},
|
||||
};
|
||||
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[229] =
|
||||
RD_CmdKindInfo rd_cmd_kind_info_table[233] =
|
||||
{
|
||||
{0},
|
||||
{ str8_lit_comp("launch_and_run"), str8_lit_comp("Starts debugging a new instance of a target, then runs."), str8_lit_comp("launch,start,run,target"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:targets"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -575,9 +579,13 @@ RD_CmdKindInfo rd_cmd_kind_info_table[229] =
|
||||
{ str8_lit_comp("go_to_disassembly"), str8_lit_comp("Goes to the disassembly, if any, for a given source code line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp("$text_pt,"), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*1)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("go_to_source"), str8_lit_comp("Goes to the source code, if any, for a given disassembly line."), str8_lit_comp("code,source,disassembly,disasm"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("set_file_replacement_path"), str8_lit_comp("Sets the path which should be used as the replacement for the passed file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*0)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_user"), str8_lit_comp("Creates a new user file, and sets the current user path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("new_project"), str8_lit_comp("Creates a new project file, and sets the current project path as that file's path."), str8_lit_comp("new,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_user"), str8_lit_comp("Opens a user file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_project"), str8_lit_comp("Opens a project file path, immediately loading it, and begins autosaving to it."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("open_recent_project"), str8_lit_comp("Opens a recently used project file."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_Cfg, str8_lit_comp("query:recent_projects"), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("save_user"), str8_lit_comp("Saves user data to a file, and sets the current user path as that path."), str8_lit_comp("load,user,project,layout"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("save_project"), str8_lit_comp("Saves project data to a file, and sets the current project path as that path."), str8_lit_comp("project,project,session"), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*1)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*1)|(RD_QueryFlag_Required*1), RD_RegSlot_FilePath, str8_lit_comp("folder:\"$input\""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("write_user_data"), str8_lit_comp("Writes user data to the active user file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("write_project_data"), str8_lit_comp("Writes project data to the active project file."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*0)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
{ str8_lit_comp("user_settings"), str8_lit_comp("Opens user settings."), str8_lit_comp(""), str8_lit_comp(""), (RD_CmdKindFlag_ListInUI*1)|(RD_CmdKindFlag_ListInIPCDocs*1)|(RD_CmdKindFlag_ListInTextPt*0)|(RD_CmdKindFlag_ListInTextRng*0), {(RD_QueryFlag_AllowFiles*0)|(RD_QueryFlag_AllowFolders*0)|(RD_QueryFlag_CodeInput*0)|(RD_QueryFlag_KeepOldInput*0)|(RD_QueryFlag_SelectOldInput*0)|(RD_QueryFlag_Floating*0)|(RD_QueryFlag_Required*0), RD_RegSlot_Null, str8_lit_comp(""), str8_lit_comp(""), CTRL_EntityKind_Null}},
|
||||
@@ -708,7 +716,7 @@ RD_CmdKindInfo rd_cmd_kind_info_table[229] =
|
||||
{ str8_lit_comp("geo3d"), str8_lit_comp("Opens a Geometry (3D) tab."), {0}, {0}, RD_CmdKindFlag_ListInUI|RD_CmdKindFlag_ListInIPCDocs|RD_CmdKindFlag_ListInTab},
|
||||
};
|
||||
|
||||
struct {String8 string; RD_Binding binding;} rd_default_binding_table[111] =
|
||||
struct {String8 string; RD_Binding binding;} rd_default_binding_table[115] =
|
||||
{
|
||||
{str8_lit_comp("kill_all"), {OS_Key_F5, 0 |OS_Modifier_Shift }},
|
||||
{str8_lit_comp("step_into_inst"), {OS_Key_F11, 0 |OS_Modifier_Alt}},
|
||||
@@ -754,8 +762,12 @@ struct {String8 string; RD_Binding binding;} rd_default_binding_table[111] =
|
||||
{str8_lit_comp("reload_active"), {OS_Key_R, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift }},
|
||||
{str8_lit_comp("switch"), {OS_Key_I, 0 |OS_Modifier_Ctrl }},
|
||||
{str8_lit_comp("switch_to_partner_file"), {OS_Key_O, 0 |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("open_user"), {OS_Key_N, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("open_project"), {OS_Key_N, 0 |OS_Modifier_Ctrl |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("open_user"), {OS_Key_O, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("open_project"), {OS_Key_O, 0 |OS_Modifier_Ctrl |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("save_user"), {OS_Key_S, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift |OS_Modifier_Alt}},
|
||||
{str8_lit_comp("save_project"), {OS_Key_S, 0 |OS_Modifier_Ctrl |OS_Modifier_Shift }},
|
||||
{str8_lit_comp("edit"), {OS_Key_F2, 0 }},
|
||||
{str8_lit_comp("accept"), {OS_Key_Return, 0 }},
|
||||
{str8_lit_comp("cancel"), {OS_Key_Esc, 0 }},
|
||||
|
||||
@@ -154,9 +154,13 @@ RD_CmdKind_ShowFileInExplorer,
|
||||
RD_CmdKind_GoToDisassembly,
|
||||
RD_CmdKind_GoToSource,
|
||||
RD_CmdKind_SetFileReplacementPath,
|
||||
RD_CmdKind_NewUser,
|
||||
RD_CmdKind_NewProject,
|
||||
RD_CmdKind_OpenUser,
|
||||
RD_CmdKind_OpenProject,
|
||||
RD_CmdKind_OpenRecentProject,
|
||||
RD_CmdKind_SaveUser,
|
||||
RD_CmdKind_SaveProject,
|
||||
RD_CmdKind_WriteUserData,
|
||||
RD_CmdKind_WriteProjectData,
|
||||
RD_CmdKind_UserSettings,
|
||||
@@ -562,7 +566,7 @@ Z(getting_started)\
|
||||
C_LINKAGE_BEGIN
|
||||
extern String8 rd_tab_fast_path_view_name_table[24];
|
||||
extern String8 rd_tab_fast_path_query_name_table[24];
|
||||
extern RD_VocabInfo rd_vocab_info_table[336];
|
||||
extern RD_VocabInfo rd_vocab_info_table[340];
|
||||
extern RD_NameSchemaInfo rd_name_schema_info_table[24];
|
||||
extern Rng1U64 rd_reg_slot_range_table[43];
|
||||
extern String8 rd_binding_version_remap_old_name_table[8];
|
||||
|
||||
@@ -873,9 +873,13 @@ RD_CmdTable: // | | | |
|
||||
{SetFileReplacementPath 0 0 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "set_file_replacement_path" "Set File Replacement Path" "Sets the path which should be used as the replacement for the passed file." "" "" }
|
||||
|
||||
//- rjf: setting config paths
|
||||
{NewUser 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Add "new_user" "New User" "Creates a new user file, and sets the current user path as that file's path." "new,user,project,layout" "" }
|
||||
{NewProject 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Add "new_project" "New Project" "Creates a new project file, and sets the current project path as that file's path." "new,user,project,layout" "" }
|
||||
{OpenUser 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Person "open_user" "Open User" "Opens a user file path, immediately loading it, and begins autosaving to it." "load,user,project,layout" "" }
|
||||
{OpenProject 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Briefcase "open_project" "Open Project" "Opens a project file path, immediately loading it, and begins autosaving to it." "project,project,session" "" }
|
||||
{OpenRecentProject 1 1 0 0 "query:recent_projects" Cfg null RecentProject Null 0 0 0 0 0 1 1 Briefcase "open_recent_project" "Open Recent Project" "Opens a recently used project file." "project,project,session" "" }
|
||||
{SaveUser 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Save "save_user" "Save User" "Saves user data to a file, and sets the current user path as that path." "load,user,project,layout" "" }
|
||||
{SaveProject 1 1 0 0 `folder:\\"$input\\"` FilePath null Nil Null 1 0 0 0 0 1 1 Save "save_project" "Save Project" "Saves project data to a file, and sets the current project path as that path." "project,project,session" "" }
|
||||
|
||||
//- rjf: writing config changes
|
||||
{WriteUserData 0 1 0 0 "" Null null Nil Null 0 0 0 0 0 0 0 Null "write_user_data" "Write User Data" "Writes user data to the active user file." "" "" }
|
||||
@@ -1147,8 +1151,12 @@ RD_DefaultBindingTable:
|
||||
{ "switch_to_partner_file" O 0 0 alt }
|
||||
|
||||
//- rjf: setting config paths
|
||||
{ "open_user" N ctrl shift alt }
|
||||
{ "open_project" N ctrl 0 alt }
|
||||
{ "open_user" O ctrl shift alt }
|
||||
{ "open_project" O ctrl 0 alt }
|
||||
{ "save_user" S ctrl shift alt }
|
||||
{ "save_project" S ctrl shift 0 }
|
||||
|
||||
//- rjf: meta controls
|
||||
{ "edit" F2 0 0 0 }
|
||||
|
||||
@@ -7251,10 +7251,14 @@ rd_window_frame(void)
|
||||
String8 cmds[] =
|
||||
{
|
||||
rd_cmd_kind_info_table[RD_CmdKind_Open].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenPalette].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_NewProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenRecentProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_OpenPalette].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_SaveUser].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_SaveProject].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_UserSettings].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_ProjectSettings].string,
|
||||
rd_cmd_kind_info_table[RD_CmdKind_Exit].string,
|
||||
@@ -7262,10 +7266,14 @@ rd_window_frame(void)
|
||||
U32 codepoints[] =
|
||||
{
|
||||
'o',
|
||||
'n',
|
||||
'w',
|
||||
'j',
|
||||
'u',
|
||||
'p',
|
||||
'r',
|
||||
'n',
|
||||
's',
|
||||
'a',
|
||||
'e',
|
||||
't',
|
||||
'x',
|
||||
@@ -12578,6 +12586,74 @@ rd_frame(void)
|
||||
}
|
||||
}
|
||||
}break;
|
||||
case RD_CmdKind_NewUser:
|
||||
case RD_CmdKind_NewProject:
|
||||
{
|
||||
String8 new_path = rd_regs()->file_path;
|
||||
B32 file_will_be_overwritten = (os_properties_from_file_path(new_path).created != 0);
|
||||
UI_Key key = ui_key_from_string(ui_key_zero(), str8_lit("new_config_overwrite_confirm"));
|
||||
if(file_will_be_overwritten && !rd_regs()->force_confirm && !ui_key_match(rd_state->popup_key, key))
|
||||
{
|
||||
rd_state->popup_key = key;
|
||||
rd_state->popup_active = 1;
|
||||
arena_clear(rd_state->popup_arena);
|
||||
MemoryZeroStruct(&rd_state->popup_cmds);
|
||||
rd_state->popup_title = push_str8f(rd_state->popup_arena, "Are you sure you want to save to this path?");
|
||||
rd_state->popup_desc = push_str8f(rd_state->popup_arena, "The existing file at '%S' will be overwritten.", new_path);
|
||||
RD_Regs *regs = rd_regs_copy(rd_frame_arena(), rd_regs());
|
||||
regs->force_confirm = 1;
|
||||
rd_cmd_list_push_new(rd_state->popup_arena, &rd_state->popup_cmds, rd_cmd_kind_info_table[kind].string, regs);
|
||||
}
|
||||
else switch(kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RD_CmdKind_NewUser:
|
||||
{
|
||||
os_delete_file_at_path(new_path);
|
||||
rd_cmd(RD_CmdKind_OpenUser, .file_path = new_path);
|
||||
}break;
|
||||
case RD_CmdKind_NewProject:
|
||||
{
|
||||
os_delete_file_at_path(new_path);
|
||||
rd_cmd(RD_CmdKind_OpenProject, .file_path = new_path);
|
||||
}break;
|
||||
}
|
||||
}break;
|
||||
case RD_CmdKind_SaveUser:
|
||||
case RD_CmdKind_SaveProject:
|
||||
{
|
||||
String8 new_path = rd_regs()->file_path;
|
||||
B32 file_will_be_overwritten = (os_properties_from_file_path(new_path).created != 0);
|
||||
UI_Key key = ui_key_from_string(ui_key_zero(), str8_lit("save_config_overwrite_confirm"));
|
||||
if(file_will_be_overwritten && !rd_regs()->force_confirm && !ui_key_match(rd_state->popup_key, key))
|
||||
{
|
||||
rd_state->popup_key = key;
|
||||
rd_state->popup_active = 1;
|
||||
arena_clear(rd_state->popup_arena);
|
||||
MemoryZeroStruct(&rd_state->popup_cmds);
|
||||
rd_state->popup_title = push_str8f(rd_state->popup_arena, "Are you sure you want to save to this path?");
|
||||
rd_state->popup_desc = push_str8f(rd_state->popup_arena, "The existing file at '%S' will be overwritten.", new_path);
|
||||
RD_Regs *regs = rd_regs_copy(rd_frame_arena(), rd_regs());
|
||||
regs->force_confirm = 1;
|
||||
rd_cmd_list_push_new(rd_state->popup_arena, &rd_state->popup_cmds, rd_cmd_kind_info_table[kind].string, regs);
|
||||
}
|
||||
else switch(kind)
|
||||
{
|
||||
default:{}break;
|
||||
case RD_CmdKind_SaveUser:
|
||||
{
|
||||
arena_clear(rd_state->user_path_arena);
|
||||
rd_state->user_path = push_str8_copy(rd_state->user_path_arena, new_path);
|
||||
rd_cmd(RD_CmdKind_WriteUserData);
|
||||
}break;
|
||||
case RD_CmdKind_SaveProject:
|
||||
{
|
||||
arena_clear(rd_state->project_path_arena);
|
||||
rd_state->project_path = push_str8_copy(rd_state->project_path_arena, new_path);
|
||||
rd_cmd(RD_CmdKind_WriteProjectData);
|
||||
}break;
|
||||
}
|
||||
}break;
|
||||
|
||||
//- rjf: writing config changes
|
||||
case RD_CmdKind_WriteUserData: dst_path = rd_state->user_path; bucket_name = str8_lit("user"); goto write;
|
||||
|
||||
+14
-14
@@ -197,24 +197,11 @@
|
||||
// [ ] we probably want to disable pop/pull out for transient things, e.g. theme color cfgs
|
||||
// [ ] finish theme editing, build themes - replace code colors map with new theme stuff
|
||||
//
|
||||
// [ ] evaluate `foo.bar` symbol names???
|
||||
// [ ] maybe add extra caching layer to process memory querying? we pay a pretty
|
||||
// heavy cost even to just read 8 bytes...
|
||||
// [ ] odin's demo is busted - need to revert PDB conversion type index changes.
|
||||
// [ ] crash bug, release mode - filter globals view (try with debugging raddbg, typing `dev` in globals view)
|
||||
//
|
||||
//- readme improvements
|
||||
// [ ] I was a little confused about what a profile file was. I understood
|
||||
// what the user file was, but the profile file sounded like it should
|
||||
// perhaps be per-project, yet it sounded like it was meant to be somewhat
|
||||
// global? I don't have any feedback here because it probably will make
|
||||
// sense once I use the debugger more, but I just thought I'd make a note
|
||||
// to say that I was confused about it after reading the manual, so
|
||||
// perhaps you could elaborate a little more on it in there.
|
||||
// [ ] It wasn't clear to me how you save a user or project file. I can see
|
||||
// how to load them, but not how you save them. Obviously I can just copy
|
||||
// the files myself in the shell, but it seemed weird that there was no
|
||||
// "save" option in the menus.
|
||||
//
|
||||
//- no immediate action but check before release:
|
||||
// [ ] user switching
|
||||
// [ ] project switching
|
||||
@@ -508,6 +495,19 @@
|
||||
// [x] unattached process evaluation - need a string to evaluate so I can generate
|
||||
// the evals
|
||||
// [x] save-to-project (command line targets)
|
||||
// [x] odin's demo is busted - need to revert PDB conversion type index changes.
|
||||
//- readme improvements
|
||||
// [x] I was a little confused about what a profile file was. I understood
|
||||
// what the user file was, but the profile file sounded like it should
|
||||
// perhaps be per-project, yet it sounded like it was meant to be somewhat
|
||||
// global? I don't have any feedback here because it probably will make
|
||||
// sense once I use the debugger more, but I just thought I'd make a note
|
||||
// to say that I was confused about it after reading the manual, so
|
||||
// perhaps you could elaborate a little more on it in there.
|
||||
// [x] It wasn't clear to me how you save a user or project file. I can see
|
||||
// how to load them, but not how you save them. Obviously I can just copy
|
||||
// the files myself in the shell, but it seemed weird that there was no
|
||||
// "save" option in the menus.
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Build Options
|
||||
|
||||
Reference in New Issue
Block a user