[UI] Fix ClearInput not called in ImGuiDrawer after deferred dialog removal
Also cleanup the code involved in dialog registration, and update the explanation of why dialog removal is delayed until the end of drawing (the original was written back when window listener and UI drawer callback registration during the execution of the callbacks was deferred, but that was wrong as that might result in execution of callbacks belonging to now-deleted objects).
This commit is contained in:
@@ -74,6 +74,9 @@ class ImGuiDrawer : public WindowInputListener, public UIDrawer {
|
||||
void UpdateMousePosition(float x, float y);
|
||||
void SwitchToPhysicalMouseAndUpdateMousePosition(const MouseEvent& e);
|
||||
|
||||
bool IsDrawingDialogs() const { return dialog_loop_next_index_ != SIZE_MAX; }
|
||||
void DetachIfLastDialogRemoved();
|
||||
|
||||
Window* window_;
|
||||
size_t z_order_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user