[UI] Fixed issue with multiple ImGui windows having the same ID

This commit is contained in:
Gliniak 2025-04-24 22:24:54 +02:00
parent 8f647c548d
commit afe74e3d72
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@
namespace xe { namespace xe {
namespace ui { namespace ui {
uint64_t ImGuiDialog::next_window_id_ = 0; std::atomic<uint64_t> ImGuiDialog::next_window_id_ = 0;
ImGuiDialog::ImGuiDialog(ImGuiDrawer* imgui_drawer) ImGuiDialog::ImGuiDialog(ImGuiDrawer* imgui_drawer)
: imgui_drawer_(imgui_drawer) { : imgui_drawer_(imgui_drawer) {

View file

@ -49,7 +49,7 @@ class ImGuiDialog {
virtual void OnDraw(ImGuiIO& io) {} virtual void OnDraw(ImGuiIO& io) {}
private: private:
static uint64_t next_window_id_; static std::atomic<uint64_t> next_window_id_;
ImGuiDrawer* imgui_drawer_ = nullptr; ImGuiDrawer* imgui_drawer_ = nullptr;
bool has_close_pending_ = false; bool has_close_pending_ = false;