mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Merge branch 'master' into docking
# Conflicts: # examples/imgui_impl_opengl3.cpp # imgui_widgets.cpp
This commit is contained in:
12
imgui.cpp
12
imgui.cpp
@ -5,7 +5,7 @@
|
||||
// Newcomers, read 'Programmer guide' below for notes on how to setup Dear ImGui in your codebase.
|
||||
// Get latest version at https://github.com/ocornut/imgui
|
||||
// Releases change-log at https://github.com/ocornut/imgui/releases
|
||||
// Technical Support for Getting Started https://discourse.dearimgui.org/c/getting-started
|
||||
// Technical Support for Getting Started https://github.com/ocornut/imgui/wiki
|
||||
// Gallery (please post your screenshots/video there!): https://github.com/ocornut/imgui/issues/2847
|
||||
|
||||
// Developed by Omar Cornut and every direct or indirect contributors to the GitHub.
|
||||
@ -5134,8 +5134,8 @@ static ImVec2 CalcWindowSizeAfterConstraint(ImGuiWindow* window, ImVec2 new_size
|
||||
g.NextWindowData.SizeCallback(&data);
|
||||
new_size = data.DesiredSize;
|
||||
}
|
||||
new_size.x = ImFloor(new_size.x);
|
||||
new_size.y = ImFloor(new_size.y);
|
||||
new_size.x = IM_FLOOR(new_size.x);
|
||||
new_size.y = IM_FLOOR(new_size.y);
|
||||
}
|
||||
|
||||
// Minimum size
|
||||
@ -7139,7 +7139,7 @@ void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond con
|
||||
if (size.x > 0.0f)
|
||||
{
|
||||
window->AutoFitFramesX = 0;
|
||||
window->SizeFull.x = ImFloor(size.x);
|
||||
window->SizeFull.x = IM_FLOOR(size.x);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7149,7 +7149,7 @@ void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond con
|
||||
if (size.y > 0.0f)
|
||||
{
|
||||
window->AutoFitFramesY = 0;
|
||||
window->SizeFull.y = ImFloor(size.y);
|
||||
window->SizeFull.y = IM_FLOOR(size.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -9021,7 +9021,7 @@ static void ImGui::NavUpdate()
|
||||
{
|
||||
// *Fallback* manual-scroll with Nav directional keys when window has no navigable item
|
||||
ImGuiWindow* window = g.NavWindow;
|
||||
const float scroll_speed = ImFloor(window->CalcFontSize() * 100 * g.IO.DeltaTime + 0.5f); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
|
||||
const float scroll_speed = IM_ROUND(window->CalcFontSize() * 100 * g.IO.DeltaTime); // We need round the scrolling speed because sub-pixel scroll isn't reliably supported.
|
||||
if (window->DC.NavLayerActiveMask == 0x00 && window->DC.NavHasScroll && g.NavMoveRequest)
|
||||
{
|
||||
if (g.NavMoveDir == ImGuiDir_Left || g.NavMoveDir == ImGuiDir_Right)
|
||||
|
Reference in New Issue
Block a user