From 35a4d45cf2bed4d617038d41ed81a98c0268019a Mon Sep 17 00:00:00 2001 From: David G Yu Date: Mon, 16 Dec 2013 12:08:56 -0800 Subject: [PATCH] Changed the hud to ignore mouse clicks when not visible. --- examples/common/hud.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/common/hud.cpp b/examples/common/hud.cpp index 623b2989..c21d1699 100644 --- a/examples/common/hud.cpp +++ b/examples/common/hud.cpp @@ -126,6 +126,10 @@ Hud::KeyDown(int key) bool Hud::MouseClick(int x, int y) { + if (!IsVisible()) { + return false; + } + for (std::vector::iterator it = _radioButtons.begin(); it != _radioButtons.end(); ++it) { if (hitTest(*it, x, y)) {