mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-11 16:18:07 +00:00
display folder in title fstr generation for file evaluations, but only if not inside a folder context
This commit is contained in:
@@ -1636,7 +1636,8 @@ rd_info_from_watch_row_cell(Arena *arena, EV_Row *row, EV_StringFlags string_fla
|
||||
//- rjf: files -> button for file
|
||||
else if(result.file_path.size != 0)
|
||||
{
|
||||
result.expr_fstrs = rd_title_fstrs_from_file_path(arena, result.file_path);
|
||||
B32 need_folder = !str8_match(row_info->group_cfg_name, str8_lit("folder"), 0);
|
||||
result.expr_fstrs = rd_title_fstrs_from_file_path(arena, result.file_path, need_folder);
|
||||
result.flags |= RD_WatchCellFlag_Button;
|
||||
}
|
||||
|
||||
|
||||
@@ -659,7 +659,7 @@ rd_title_fstrs_from_code_name(Arena *arena, String8 code_name)
|
||||
}
|
||||
|
||||
internal DR_FStrList
|
||||
rd_title_fstrs_from_file_path(Arena *arena, String8 file_path)
|
||||
rd_title_fstrs_from_file_path(Arena *arena, String8 file_path, B32 include_folder)
|
||||
{
|
||||
DR_FStrList fstrs = {0};
|
||||
String8 file_name = str8_skip_last_slash(file_path);
|
||||
@@ -685,6 +685,17 @@ rd_title_fstrs_from_file_path(Arena *arena, String8 file_path)
|
||||
}
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, str8_lit(" "));
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, file_name);
|
||||
if(include_folder)
|
||||
{
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms, str8_lit(" "));
|
||||
UI_TagF("weak")
|
||||
{
|
||||
dr_fstrs_push_new(arena, &fstrs, ¶ms,
|
||||
str8_chop_last_slash(file_path),
|
||||
.size = params.size*0.9f,
|
||||
.color = ui_color_from_name(str8_lit("text")));
|
||||
}
|
||||
}
|
||||
return fstrs;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ struct RD_CodeSliceSignal
|
||||
internal DR_FStrList rd_title_fstrs_from_cfg(Arena *arena, CFG_Node *cfg, B32 include_extras);
|
||||
internal DR_FStrList rd_title_fstrs_from_ctrl_entity(Arena *arena, D_Entity *entity, B32 include_extras);
|
||||
internal DR_FStrList rd_title_fstrs_from_code_name(Arena *arena, String8 code_name);
|
||||
internal DR_FStrList rd_title_fstrs_from_file_path(Arena *arena, String8 file_path);
|
||||
internal DR_FStrList rd_title_fstrs_from_file_path(Arena *arena, String8 file_path, B32 include_folder);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: UI Widgets: Loading Overlay
|
||||
|
||||
Reference in New Issue
Block a user