}
}
-float MENU_ASPECT = 1.25; // 1280x1024
-float MENU_MINHEIGHT = 600;
+const float MENU_ASPECT = 1.25; // 1280x1024
+const float MENU_MINHEIGHT = 600;
float conwidth_s, conheight_s, vidwidth_s, vidheight_s, realconwidth,
realconheight, screenconwidth, screenconheight;
void draw_reset_cropped()
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;
if(key == K_SHIFT) menuShiftState |= S_SHIFT;
}
-float SCALEMODE_CROP = 0;
-float SCALEMODE_LETTERBOX = 1;
-float SCALEMODE_WIDTH = 2;
-float SCALEMODE_HEIGHT = 3;
-float SCALEMODE_STRETCH = 4;
+const float SCALEMODE_CROP = 0;
+const float SCALEMODE_LETTERBOX = 1;
+const float SCALEMODE_WIDTH = 2;
+const float SCALEMODE_HEIGHT = 3;
+const float SCALEMODE_STRETCH = 4;
void draw_Picture_Aligned(vector algn, float scalemode, string img, float a)
{
vector sz, org, isz, isz_w, isz_h;
for(e = NULL; (e = find(e, name, itemname)); )
if(e.classname != "vtbl")
break;
- if(e)
+
+ if((e) && (!e.requiresConnection || (gamestatus & (GAME_ISSERVER | GAME_CONNECTED))))
{
m_hide();
m_activate_window(e);