From c7bd2c5e67e86c60df55ba55142566dabc8b5d88 Mon Sep 17 00:00:00 2001 From: Dario Manesku Date: Wed, 29 Oct 2014 02:07:15 +0100 Subject: [PATCH] Making imguiCube() align better. --- examples/common/imgui/imgui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index e82b4cfda..08ba528ff 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -1747,7 +1747,7 @@ struct Imgui || ImguiAlign::Right == _align) { xx = area.m_widgetX; - width = area.m_widgetW-1; //TODO: -1 ! + width = area.m_widgetW; } else //if (ImguiAlign::Center == _align //|| ImguiAlign::CenterIndented == _align). @@ -1764,7 +1764,7 @@ struct Imgui const bool over = enabled && inRect(xx, yy, width, height); const bool res = buttonLogic(id, over); - const float scale = float(width/2); + const float scale = float(width/2)+0.25f; float mtx[16]; bx::mtxSRT(mtx, scale, scale, 1.0f, 0.0f, 0.0f, 0.0f, float(xx), float(yy), 0.0f);