From f90152155d20e3833f7cd82d38c9ccb8cb6272e8 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Thu, 4 Jun 2020 08:38:37 -0700 Subject: [PATCH] Fixed a bug were incorrect UI controls were taking focus. --- REDALERT/GADGET.CPP | 3 +++ 1 file changed, 3 insertions(+) diff --git a/REDALERT/GADGET.CPP b/REDALERT/GADGET.CPP index e5b77f4..01b2ec9 100644 --- a/REDALERT/GADGET.CPP +++ b/REDALERT/GADGET.CPP @@ -201,6 +201,9 @@ int GadgetClass::Clicked_On(KeyNumType & key, unsigned flags, int mousex, int mo */ flags &= Flags; + if (mousex - X < 0 || mousey - Y < 0) + return false; + /* ** If keyboard input should be processed by this "gadget" and keyboard input is ** detected, then always call the action function. It is up to the action function