mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-17 01:22:24 -07:00
start on new 'pull/pop out' button for visualizers
This commit is contained in:
@@ -5247,6 +5247,32 @@ rd_view_ui(Rng2F32 rect)
|
||||
UI_PermissionFlags(UI_PermissionFlag_Clicks|UI_PermissionFlag_ScrollX)
|
||||
UI_Flags(0)
|
||||
{
|
||||
// rjf: 'pull out' button
|
||||
UI_TagF("tab") UI_Rect(r2f32p(ui_top_font_size()*1.5f,
|
||||
ui_top_font_size()*1.5f,
|
||||
ui_top_font_size()*1.5f + ui_top_font_size()*3.f,
|
||||
ui_top_font_size()*1.5f + ui_top_font_size()*3.f))
|
||||
UI_CornerRadius(ui_top_font_size()*1.5f)
|
||||
UI_TextAlignment(UI_TextAlign_Center)
|
||||
UI_HoverCursor(OS_Cursor_HandPoint)
|
||||
RD_Font(RD_FontSlot_Icons)
|
||||
{
|
||||
UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_Clickable|
|
||||
UI_BoxFlag_Floating|
|
||||
UI_BoxFlag_DrawText|
|
||||
UI_BoxFlag_DrawBorder|
|
||||
UI_BoxFlag_DrawBackground|
|
||||
UI_BoxFlag_DrawActiveEffects|
|
||||
UI_BoxFlag_DrawHotEffects,
|
||||
"%S###pull_out",
|
||||
rd_icon_kind_text_table[RD_IconKind_Window]);
|
||||
UI_Signal sig = ui_signal_from_box(box);
|
||||
if(ui_dragging(sig) && !contains_2f32(box->rect, ui_mouse()))
|
||||
{
|
||||
rd_drag_begin(RD_RegSlot_View);
|
||||
}
|
||||
}
|
||||
|
||||
// rjf: loading animation container
|
||||
UI_Box *loading_overlay_container = &ui_nil_box;
|
||||
UI_Parent(box) UI_WidthFill UI_HeightFill
|
||||
|
||||
@@ -2982,9 +2982,9 @@ internal UI_BOX_CUSTOM_DRAW(rd_bitmap_view_canvas_box_draw)
|
||||
F32 grid_cell_size_cvs = box->font_size*10.f;
|
||||
F32 grid_line_thickness_px = Max(2.f, box->font_size*0.1f);
|
||||
Vec4F32 grid_line_color = {0};
|
||||
UI_TagF("alt")
|
||||
UI_TagF("weak")
|
||||
{
|
||||
grid_line_color = ui_color_from_name(str8_lit("background"));
|
||||
grid_line_color = ui_color_from_name(str8_lit("text"));
|
||||
}
|
||||
for EachEnumVal(Axis2, axis)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
|
||||
if(expr_string.size != 0)
|
||||
{
|
||||
String8 query_name = rd_query_from_eval_string(arena, expr_string);
|
||||
if(query_name.size != 0 && !str8_match(query_name, str8_lit("watches"), 0))
|
||||
if(query_name.size != 0)
|
||||
{
|
||||
String8 query_code_name = query_name;
|
||||
String8 query_display_name = rd_display_from_code_name(query_code_name);
|
||||
@@ -65,6 +65,10 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
|
||||
{
|
||||
query_code_name = rd_singular_from_code_name_plural(query_name);
|
||||
collection_name = rd_display_plural_from_code_name(query_code_name);
|
||||
if(str8_match(collection_name, str8_lit("Watches"), 0))
|
||||
{
|
||||
collection_name = str8_lit("Watch");
|
||||
}
|
||||
}
|
||||
RD_IconKind query_icon_kind = rd_icon_kind_from_code_name(query_code_name);
|
||||
if(query_icon_kind != RD_IconKind_Null)
|
||||
@@ -234,7 +238,7 @@ rd_title_fstrs_from_cfg(Arena *arena, RD_Cfg *cfg)
|
||||
}
|
||||
|
||||
//- rjf: cfg has expression attached -> use that
|
||||
else if(expr_string.size != 0 && !is_within_window)
|
||||
else if(expr_string.size != 0)
|
||||
{
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, expr_string, .font = rd_font_from_slot(RD_FontSlot_Code), .raster_flags = rd_raster_flags_from_slot(RD_FontSlot_Code));
|
||||
dr_fstrs_push_new(arena, &result, ¶ms, str8_lit(" "));
|
||||
|
||||
Reference in New Issue
Block a user