Skip to content

Commit

Permalink
debug: Support changing attachment joint from the inspector
Browse files Browse the repository at this point in the history
  • Loading branch information
BastianBlokland committed Sep 20, 2024
1 parent 07c8934 commit 641428e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libs/debug/src/inspector.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,8 +827,21 @@ static void inspector_panel_draw_attachment(
if (attach) {
inspector_panel_next(canvas, panelComp, table);
if (inspector_panel_section(canvas, string_lit("Attachment"))) {

DynString jointName = dynstring_create(g_allocScratch, 64);
if (attach->jointName) {
dynstring_append(&jointName, stringtable_lookup(g_stringtable, attach->jointName));
}

inspector_panel_next(canvas, panelComp, table);
ui_label(canvas, string_lit("Joint"));
ui_table_next_column(canvas, table);
if (ui_textbox(canvas, &jointName, .maxTextLength = 64)) {
attach->jointIndex = sentinel_u32;
attach->jointName = string_maybe_hash(dynstring_view(&jointName));
}

inspector_panel_next(canvas, panelComp, table);
ui_label(canvas, string_lit("Offset"));
ui_table_next_column(canvas, table);
debug_widget_editor_vec3(canvas, &attach->offset, UiWidget_Default);
Expand Down

0 comments on commit 641428e

Please sign in to comment.