[UI] Fixed issue with multiple ImGui windows having the same ID
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user