From 1918ecfdd6ab7dccda9f272c1a23bb47baf1ae7f Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Wed, 18 Jun 2025 20:44:37 +0100 Subject: [PATCH] feedback from az fixes for interaction from az --- Engine/source/T3D/fps/guiCrossHairHud.cpp | 3 +-- Engine/source/gui/core/guiCanvas.cpp | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Engine/source/T3D/fps/guiCrossHairHud.cpp b/Engine/source/T3D/fps/guiCrossHairHud.cpp index f8d5afdeb..052350be1 100644 --- a/Engine/source/T3D/fps/guiCrossHairHud.cpp +++ b/Engine/source/T3D/fps/guiCrossHairHud.cpp @@ -126,7 +126,6 @@ void GuiCrossHairHud::initPersistFields() void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect) { - GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL; // Must have a connection and player control object GameConnection* conn = GameConnection::getConnectionToServer(); if (!conn) @@ -162,6 +161,7 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect) { if (mFrameTime->getElapsedMs() > 32) { + GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL; mFrameTime->reset(); Point3F newStart, newEnd; @@ -204,7 +204,6 @@ void GuiCrossHairHud::onRender(Point2I offset, const RectI &updateRect) } } } - } // Hit something... but we'll only display health for named diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index b14f7ece2..c9f603d05 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -694,7 +694,10 @@ bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent) if (GuiOffscreenCanvas::sActiveOffscreenCanvas && (GuiOffscreenCanvas::sActiveOffscreenCanvas != this) && GuiOffscreenCanvas::sActiveOffscreenCanvas->processInputEvent(inputEvent)) + { + GuiOffscreenCanvas::sActiveOffscreenCanvas = NULL; return mConsumeLastInputEvent; + } // First call the general input handler (on the extremely off-chance that it will be handled): if (mFirstResponder && mFirstResponder->onInputEvent(inputEvent))