Skip to content

Commit

Permalink
Fix heading closing when counts change
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercd committed Oct 25, 2023
1 parent de13e66 commit d81bc4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component-explorer/entity.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ local function show_entity(entity_id, data)
table.insert(tags, tag)
end

if imgui.CollapsingHeader("Tags (" .. #tags .. ")") then
if imgui.CollapsingHeader("Tags (" .. #tags .. ")###entity_tags") then
local function add_tag(t) EntityAddTag(entity_id, t) end
local function remove_tag(t) EntityRemoveTag(entity_id, t) end
tags_gui.show(data.tag_data, tags, add_tag, remove_tag, common_entity_tags)
Expand All @@ -230,7 +230,7 @@ local function show_entity(entity_id, data)

local children = EntityGetAllChildren(entity_id)
if children then
if imgui.CollapsingHeader("Child Entities (" .. #children .. ")") then
if imgui.CollapsingHeader("Child Entities (" .. #children .. ")###entity_child_entites") then
show_entity_children(children)
end
else
Expand All @@ -240,7 +240,7 @@ local function show_entity(entity_id, data)
end

local components = EntityGetAllComponents(entity_id)
if imgui.CollapsingHeader("Components (" .. #components .. ")") then
if imgui.CollapsingHeader("Components (" .. #components .. ")###entity_components") then
_, data.component_search = imgui.InputText("Type Search", data.component_search)

if imgui.Button("+ Add Component") then
Expand Down

0 comments on commit d81bc4c

Please sign in to comment.