imgui-rs
imgui-rs copied to clipboard
Ability to fetch current frame.
Maybe i am missing something but i could not find a workaround for this without a method that looks something like this. Example use-case: While using bevy engine's ECS model and storing the imgui Context as a non-sendable resource in ECS's world i am completely unable to construct imgui's UI from different systems since only one scope can own mutable reference to the current frame's Ui. This method allows me to store imgui's context as a resource and retreive current frame on demand.
Also i found set_current_context useful for when i need to call imgui functions from a shared library (something to do with shared libraries having its own static memory for imgui context pointer). Explanation here