]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/menu.qc
Merge remote-tracking branch 'origin/zykure/playerstats' into samual/combined_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / menu.qc
index c63980d49954e7cc9e866536ce91d278b452d534..53972f9109e9f507ce5b369ca2b4dac65599d797 100644 (file)
@@ -259,6 +259,19 @@ void m_keydown(float key, float ascii)
                return;
        if(!Menu_Active)
                return;
+
+       if(menuMouseMode)
+       if(key >= K_MOUSE1 && key <= K_MOUSE3)
+       {
+               // detect a click outside of the game window
+               vector p = getmousepos();
+               if(p_x < 0 || p_x > realconwidth || p_y < 0 || p_y > realconheight)
+               {
+                       ++mouseButtonsPressed;
+                       return;
+               }
+       }
+
        if(keyGrabber)
        {
                entity e;