mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Viewport: Store current dpi scale in context.
This commit is contained in:
@ -1079,6 +1079,7 @@ struct ImGuiContext
|
||||
|
||||
// Viewports
|
||||
ImVector<ImGuiViewportP*> Viewports; // Active viewports (always 1+, and generally 1 unless multi-viewports are enabled). Each viewports hold their copy of ImDrawData.
|
||||
float CurrentDpiScale; // == CurrentViewport->DpiScale
|
||||
ImGuiViewportP* CurrentViewport; // We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport()
|
||||
ImGuiViewportP* MouseViewport;
|
||||
ImGuiViewportP* MouseLastHoveredViewport; // Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + honoring the _NoInputs flag.
|
||||
@ -1271,6 +1272,7 @@ struct ImGuiContext
|
||||
LastActiveId = 0;
|
||||
LastActiveIdTimer = 0.0f;
|
||||
|
||||
CurrentDpiScale = 0.0f;
|
||||
CurrentViewport = NULL;
|
||||
MouseViewport = MouseLastHoveredViewport = NULL;
|
||||
PlatformLastFocusedViewport = 0;
|
||||
|
Reference in New Issue
Block a user