shift+click to toggle bps

This commit is contained in:
Ryan Fleury
2024-10-09 15:17:39 -07:00
parent 1758292074
commit 73555a2486
2 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -1844,7 +1844,7 @@ rd_title_fstrs_from_entity(Arena *arena, RD_Entity *entity, Vec4F32 secondary_co
dr_fancy_string_list_concat_in_place(&result, &cnd_fstrs);
}
}
if(entity->kind == RD_EntityKind_Target && entity->disabled)
if((entity->kind == RD_EntityKind_Target || entity->kind == RD_EntityKind_Breakpoint) && entity->disabled)
{
dr_fancy_string_list_push_new(arena, &result, rd_font_from_slot(RD_FontSlot_Code), size, v4f32(0, 0, 0, 0), str8_lit(" "));
dr_fancy_string_list_push_new(arena, &result, rd_font_from_slot(RD_FontSlot_Main), size*0.95f, secondary_color, str8_lit("(Disabled)"));
+7 -1
View File
@@ -1401,8 +1401,14 @@ rd_code_slice(RD_CodeSliceParams *params, TxtPt *cursor, TxtPt *mark, S64 *prefe
RD_RegsScope(.entity = rd_handle_from_entity(bp)) rd_set_hover_regs(RD_RegSlot_Entity);
}
// rjf: shift+click => enable breakpoint
if(ui_clicked(bp_sig) && bp_sig.event_flags & OS_Modifier_Shift)
{
rd_cmd(bp->disabled ? RD_CmdKind_EnableEntity : RD_CmdKind_DisableEntity, .entity = rd_handle_from_entity(bp));
}
// rjf: click => remove breakpoint
if(ui_clicked(bp_sig))
if(ui_clicked(bp_sig) && bp_sig.event_flags == 0)
{
rd_cmd(RD_CmdKind_RemoveEntity, .entity = rd_handle_from_entity(bp));
}