mirror of
https://github.com/ocornut/imgui.git
synced 2026-03-29 00:10:00 -05:00
This commit is a preparation toward adding ImGui apis with explicit context and making ImGui applications being able to use multiple context at the same time whatever their concurrency model. -- Prior to this commit ImGuiInputTextState::OnKeyPressed was depending on the global context to know which font and font size to use, and if it should follow MacOSX behaviors or not (c.f ConfigMacOSXBehaviors). Instead of using the global context, this commit store the context as attribute of ImGuiInputTextState. Since this state is forwarded to most of text edit related function, it possible to access font, font size and ConfigMacOSXBehaviors from everywhere. NOTE: I have noticed a bug prior to that commit: if the font or font size change while editing the same widget, the ImGuiInputTextState become invalid and there is no code to handle this invalidation. Fixing this bug is out of scope of current pull request. # Conflicts: # imgui_internal.h
406 KiB
406 KiB