From 1144eefa46fdf7a95192a00dd8de03fbacb241a2 Mon Sep 17 00:00:00 2001 From: Ben Wallis Date: Thu, 15 Apr 2021 21:45:09 +0100 Subject: [PATCH] Fixed miscount in Overitem::prim_count causing the tutorial button to fly around when multiple overitem texts are drawn --- voxygen/src/hud/overitem.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/voxygen/src/hud/overitem.rs b/voxygen/src/hud/overitem.rs index 5d0f32249a..07fbb02b03 100644 --- a/voxygen/src/hud/overitem.rs +++ b/voxygen/src/hud/overitem.rs @@ -71,7 +71,11 @@ impl<'a> Ingameable for Overitem<'a> { // TODO maybe this could be done automatically? // - 2 Text for name // - 0 or 2 Rectangle and Text for button - 2 + match self.controls.get_binding(GameInput::Interact) { + 2 + match self + .controls + .get_binding(GameInput::Interact) + .filter(|_| self.active) + { Some(_) => 2, None => 0, }