diff --git a/component-explorer/component_fields.lua b/component-explorer/component_fields.lua index 1783b49..e829402 100644 --- a/component-explorer/component_fields.lua +++ b/component-explorer/component_fields.lua @@ -417,6 +417,16 @@ function show_field_material_pairs(name, description, component_id) imgui.TreePop() end +function show_field_unsupported(field_name, description, component_id, field_type) + imgui.Text(field_name .. " (" .. field_type .. ")") + imgui.SameLine() + exclam_marker("Field is unsupported. Let me know if you think this is a mistake") + if description then + imgui.SameLine() + help_marker(description) + end +end + local type_stored_in_vector = {"int", "float", "string"} function show_field_unknown(name, type, description, component_id) diff --git a/component-explorer/init.lua b/component-explorer/init.lua index 72d0cd2..f8382fd 100644 --- a/component-explorer/init.lua +++ b/component-explorer/init.lua @@ -39,6 +39,11 @@ function help_tooltip(desc) end end +function exclam_marker(desc) + imgui.TextDisabled("(!)") + help_tooltip(desc) +end + function help_marker(desc) imgui.TextDisabled("(?)") help_tooltip(desc) diff --git a/components.lua b/components.lua index b498997..51c4d1d 100644 --- a/components.lua +++ b/components.lua @@ -244,6 +244,7 @@ function show_{{ component.name }}_fields(entity_id, component_id, data) show_field_ro_list("{{ field.name }}", {{ description }}, component_id) {% else %} -- show_field_{{ field_type }}("{{ field.name }}", {{ description }}, component_id) + show_field_unsupported("{{ field.name }}", {{ description }}, component_id, "{{ field.type }}") {% endif -%} {% endfor %}