mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 13:58:40 +00:00
file path drag/drops; a few fixes with tab drag/drop
This commit is contained in:
@@ -4639,6 +4639,21 @@ rd_window_frame(void)
|
|||||||
{
|
{
|
||||||
default:{}break;
|
default:{}break;
|
||||||
|
|
||||||
|
////////////////////////
|
||||||
|
//- rjf: file path tooltips
|
||||||
|
//
|
||||||
|
case RD_RegSlot_FilePath:
|
||||||
|
UI_Tooltip
|
||||||
|
{
|
||||||
|
FileProperties props = os_properties_from_file_path(regs->file_path);
|
||||||
|
ui_set_next_pref_width(ui_children_sum(1));
|
||||||
|
UI_Row
|
||||||
|
{
|
||||||
|
RD_Font(RD_FontSlot_Icons) ui_label(rd_icon_kind_text_table[props.flags & FilePropertyFlag_IsFolder ? RD_IconKind_FolderClosedFilled : RD_IconKind_FileOutline]);
|
||||||
|
ui_label(regs->file_path);
|
||||||
|
}
|
||||||
|
}break;
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
//- rjf: cfg tooltips
|
//- rjf: cfg tooltips
|
||||||
//
|
//
|
||||||
@@ -8051,7 +8066,7 @@ rd_window_frame(void)
|
|||||||
//////////////////////////
|
//////////////////////////
|
||||||
//- rjf: determine tab drop site
|
//- rjf: determine tab drop site
|
||||||
//
|
//
|
||||||
B32 tab_drop_is_active = ui_key_match(ui_drop_hot_key(), catchall_drop_site_key);
|
B32 tab_drop_is_active = rd_drag_is_active() && ui_key_match(ui_drop_hot_key(), catchall_drop_site_key);
|
||||||
RD_Cfg *tab_drop_prev = &rd_nil_cfg;
|
RD_Cfg *tab_drop_prev = &rd_nil_cfg;
|
||||||
{
|
{
|
||||||
F32 best_prev_distance_px = 1000000.f;
|
F32 best_prev_distance_px = 1000000.f;
|
||||||
@@ -13142,7 +13157,7 @@ rd_frame(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(origin_panel->tabs.count == 0)
|
if(origin_panel->cfg != split_panel && origin_panel->tabs.count == 0)
|
||||||
{
|
{
|
||||||
rd_cmd(RD_CmdKind_ClosePanel);
|
rd_cmd(RD_CmdKind_ClosePanel);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3064,7 +3064,12 @@ RD_VIEW_UI_FUNCTION_DEF(watch)
|
|||||||
// rjf: dragging -> drag/drop
|
// rjf: dragging -> drag/drop
|
||||||
if(ui_dragging(sig) && !contains_2f32(sig.box->rect, ui_mouse()))
|
if(ui_dragging(sig) && !contains_2f32(sig.box->rect, ui_mouse()))
|
||||||
{
|
{
|
||||||
if(cell_info.cfg != &rd_nil_cfg)
|
if(cell_info.eval.space.kind == E_SpaceKind_FileSystem)
|
||||||
|
{
|
||||||
|
String8 file_path = rd_file_path_from_eval(scratch.arena, cell_info.eval);
|
||||||
|
RD_RegsScope(.file_path = file_path) rd_drag_begin(RD_RegSlot_FilePath);
|
||||||
|
}
|
||||||
|
else if(cell_info.cfg != &rd_nil_cfg)
|
||||||
{
|
{
|
||||||
RD_RegsScope(.cfg = cell_info.cfg->id) rd_drag_begin(RD_RegSlot_Cfg);
|
RD_RegsScope(.cfg = cell_info.cfg->id) rd_drag_begin(RD_RegSlot_Cfg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user