From 980da1b56ac30799152dcb2e86daf92192703ce2 Mon Sep 17 00:00:00 2001 From: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> Date: Thu, 24 Jun 2021 09:38:08 +0100 Subject: [PATCH] Update border padding for viewport debug text (#1514) (LYN-4389) --- .../Code/Source/AtomViewportDisplayInfoSystemComponent.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp index ecdebbd6c4..89e55d8c8f 100644 --- a/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp +++ b/Gems/AtomLyIntegration/AtomViewportDisplayInfo/Code/Source/AtomViewportDisplayInfoSystemComponent.cpp @@ -41,6 +41,10 @@ namespace AZ::Render "The time period over which to calculate the framerate for r_displayInfo." ); + AZ_CVAR( + AZ::Vector2, r_topRightBorderPadding, AZ::Vector2(-40.0f, 22.0f), nullptr, AZ::ConsoleFunctorFlags::DontReplicate, + "The top right border padding for the viewport debug display text"); + void AtomViewportDisplayInfoSystemComponent::Reflect(AZ::ReflectContext* context) { if (AZ::SerializeContext* serialize = azrtti_cast(context)) @@ -151,7 +155,7 @@ namespace AZ::Render m_drawParams.m_drawViewportId = viewportContext->GetId(); auto viewportSize = viewportContext->GetViewportSize(); - m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.f, 1.f); + m_drawParams.m_position = AZ::Vector3(viewportSize.m_width, 0.0f, 1.0f) + AZ::Vector3(r_topRightBorderPadding); m_drawParams.m_color = AZ::Colors::White; m_drawParams.m_scale = AZ::Vector2(0.7f); m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right;