mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-21 23:12:01 -07:00
separation of file-only, folder-only and file-or-folder selection paths, slight tweaks to filesystem lister behavior for each; other small visual tweaks/fixes
This commit is contained in:
+1
-1
@@ -2819,7 +2819,7 @@ df_window_update_and_render(Arena *arena, OS_EventList *events, DF_Window *ws, D
|
||||
ui_push_font(main_font);
|
||||
ui_push_font_size(main_font_size);
|
||||
ui_push_pref_width(ui_em(20.f, 1));
|
||||
ui_push_pref_height(ui_em(2.25f, 1.f));
|
||||
ui_push_pref_height(ui_em(2.5f, 1.f));
|
||||
ui_push_background_color(df_rgba_from_theme_color(DF_ThemeColor_PlainBackground));
|
||||
ui_push_text_color(df_rgba_from_theme_color(DF_ThemeColor_PlainText));
|
||||
ui_push_border_color(df_rgba_from_theme_color(DF_ThemeColor_PlainBorder));
|
||||
|
||||
@@ -2028,7 +2028,8 @@ DF_VIEW_UI_FUNCTION_DEF(FileSystem)
|
||||
DF_PathQuery path_query = df_path_query_from_string(query_normalized_with_opt_slash);
|
||||
F32 row_height_px = floor_f32(ui_top_font_size()*2.5f);
|
||||
F32 scroll_bar_dim = floor_f32(ui_top_font_size()*1.5f);
|
||||
B32 dir_selection = !!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_FoldersOnly);
|
||||
B32 file_selection = !!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_AllowFiles);
|
||||
B32 dir_selection = !!(ws->query_cmd_spec->info.query.flags & DF_CmdQueryFlag_AllowFolders);
|
||||
|
||||
//- rjf: get extra state for this view
|
||||
DF_FileSystemViewState *fs = df_view_user_state(view, DF_FileSystemViewState);
|
||||
@@ -3293,6 +3294,8 @@ DF_VIEW_CMD_FUNCTION_DEF(FilePathMap)
|
||||
{
|
||||
default:break;
|
||||
case DF_CoreCmdKind_PickFile:
|
||||
case DF_CoreCmdKind_PickFolder:
|
||||
case DF_CoreCmdKind_PickFileOrFolder:
|
||||
{
|
||||
String8 pick_string = cmd->params.file_path;
|
||||
Side pick_side = fpms->pick_file_dst_side;
|
||||
@@ -3471,7 +3474,7 @@ DF_VIEW_UI_FUNCTION_DEF(FilePathMap)
|
||||
if(ui_buttonf("Browse...").clicked)
|
||||
{
|
||||
DF_CmdParams params = df_cmd_params_from_view(ws, panel, view);
|
||||
params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFile);
|
||||
params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFileOrFolder);
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand));
|
||||
fpms->pick_file_dst_map = df_handle_from_entity(map);
|
||||
@@ -3546,7 +3549,7 @@ DF_VIEW_UI_FUNCTION_DEF(FilePathMap)
|
||||
if(ui_buttonf("Browse...").clicked)
|
||||
{
|
||||
DF_CmdParams params = df_cmd_params_from_view(ws, panel, view);
|
||||
params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFile);
|
||||
params.cmd_spec = df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_PickFileOrFolder);
|
||||
df_cmd_params_mark_slot(¶ms, DF_CmdParamSlot_CmdSpec);
|
||||
df_push_cmd__root(¶ms, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_RunCommand));
|
||||
fpms->pick_file_dst_map = df_handle_from_entity(map);
|
||||
|
||||
@@ -430,9 +430,7 @@ internal void df_process_info_array_sort_by_strength__in_place(DF_ProcessInfoArr
|
||||
////////////////////////////////
|
||||
//~ rjf: Entity Lister
|
||||
|
||||
internal DF_EntityListerItemList df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind,
|
||||
DF_EntityFlags omit_flags,
|
||||
String8 needle);
|
||||
internal DF_EntityListerItemList df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle);
|
||||
internal DF_EntityListerItemArray df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list);
|
||||
internal void df_entity_lister_item_array_sort_by_strength__in_place(DF_EntityListerItemArray array);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user