From 8fa989a82d064acaab82f74f9745a91ab9c65037 Mon Sep 17 00:00:00 2001 From: scawful Date: Sat, 13 Jul 2024 10:22:25 -0400 Subject: [PATCH] add GetID override using std::string --- src/app/gui/input.cc | 2 ++ src/app/gui/input.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/app/gui/input.cc b/src/app/gui/input.cc index 4da0965a..76f0fc5d 100644 --- a/src/app/gui/input.cc +++ b/src/app/gui/input.cc @@ -226,6 +226,8 @@ bool ListBox(const char* label, int* current_item, height_in_items); } +ImGuiID GetID(const std::string& id) { return ImGui::GetID(id.c_str()); } + } // namespace gui } // namespace app } // namespace yaze \ No newline at end of file diff --git a/src/app/gui/input.h b/src/app/gui/input.h index 823b4a1c..8548ae93 100644 --- a/src/app/gui/input.h +++ b/src/app/gui/input.h @@ -43,6 +43,8 @@ using ItemLabelFlags = enum ItemLabelFlag { IMGUI_API void ItemLabel(absl::string_view title, ItemLabelFlags flags); +IMGUI_API ImGuiID GetID(const std::string &id); + } // namespace gui } // namespace app } // namespace yaze