From 4764df57de6b784a12f86bbb9f63f594b137658b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Jun 2024 04:20:30 +0200 Subject: d inspector --- editor/inspect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/inspect.cpp b/editor/inspect.cpp index 349b5e3d..821a1127 100644 --- a/editor/inspect.cpp +++ b/editor/inspect.cpp @@ -34,7 +34,7 @@ bool eqv(float a, float b) { return std::fabs(a - b) < 1e-8f; } bool eqv(const String& a, const String& b) { return a == b; } template constexpr bool eqv(const Math::Vector& a, const Math::Vector& b) { return a == b; } -int corrade_string_resize_callback(ImGuiInputTextCallbackData* data) +int on_string_resize(ImGuiInputTextCallbackData* data) { if (data->EventFlag == ImGuiInputTextFlags_CallbackResize) { @@ -86,7 +86,7 @@ bool do_inspect_field(void* datum, const erased_accessor& accessor, field_repr r 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()+1, ImGuiInputTextFlags_CallbackResize, corrade_string_resize_callback, &value); + ret = ImGui::InputText(label, value.begin(), value.size()+1, ImGuiInputTextFlags_CallbackResize, on_string_resize, &value); if (ret) { auto size = value.size(); -- cgit v1.2.3