From e1b1538362d58145e8fcdf68537bcf9fa798f58b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 24 Feb 2023 11:15:10 +0100 Subject: a --- editor/inspect.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'editor/inspect.cpp') diff --git a/editor/inspect.cpp b/editor/inspect.cpp index d17ebf74..79aaaa03 100644 --- a/editor/inspect.cpp +++ b/editor/inspect.cpp @@ -85,7 +85,9 @@ void do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r accessor.read_fun(datum, accessor.reader, &value); auto orig = value; - if constexpr(std::is_same_v) + if constexpr(std::is_same_v) + ret = ImGui::InputText(label, const_cast(value.data()), value.size(), ImGuiInputTextFlags_ReadOnly); + else if constexpr(std::is_same_v) { ret = ImGui::InputText(label, value.begin(), value.size(), ImGuiInputTextFlags_CallbackResize, corrade_string_resize_callback, &value); if (auto max_len = accessor.get_max_length(datum); value.size() > max_len) @@ -202,5 +204,6 @@ MAKE_SPEC_REPRS2(std::int32_t) MAKE_SPEC_REPRS2(float) MAKE_SPEC(bool, field_repr::input) MAKE_SPEC(String, field_repr::input) +MAKE_SPEC(StringView, field_repr::input) } // namespace floormat::entities -- cgit v1.2.3