]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'Mario/quickmenu_merge' of http://nl.git.xonotic.org/xonotic/xonotic...
authorMario <mario.mario@y7mail.com>
Sun, 5 Jan 2014 03:55:29 +0000 (14:55 +1100)
committerMario <mario.mario@y7mail.com>
Sun, 5 Jan 2014 03:55:29 +0000 (14:55 +1100)
1  2 
qcsrc/client/hud.qc

diff --combined qcsrc/client/hud.qc
index 6b943b67cd5bccc04f950bce2b088c7e940be403,7ce213af4b0b4777a359df341a2d00075c226683..90f4df32a08c407c71aed4c3a808512492c2a7f5
@@@ -142,16 -142,16 +142,16 @@@ float stringwidth_nocolors(string s, ve
        return stringwidth(s, FALSE, theSize);
  }
  
- void drawstringright(vector position, string text, vector scale, vector rgb, float theAlpha, float flag)
+ void drawstringright(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
  {
-       position_x -= 2 / 3 * strlen(text) * scale_x;
-       drawstring(position, text, scale, rgb, theAlpha, flag);
+       position_x -= 2 / 3 * strlen(text) * theScale_x;
+       drawstring(position, text, theScale, rgb, theAlpha, flag);
  }
  
- void drawstringcenter(vector position, string text, vector scale, vector rgb, float theAlpha, float flag)
+ void drawstringcenter(vector position, string text, vector theScale, vector rgb, float theAlpha, float flag)
  {
-       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * scale_x);
-       drawstring(position, text, scale, rgb, theAlpha, flag);
+       position_x = 0.5 * (vid_conwidth - 0.6025 * strlen(text) * theScale_x);
+       drawstring(position, text, theScale, rgb, theAlpha, flag);
  }
  
  // return the string of the onscreen race timer
@@@ -3704,9 -3704,7 +3704,7 @@@ void HUD_InfoMessages(void
                        s = sprintf(_("^1Press ^3%s^1 for gamemode info"), getcommandkey("server info", "+show_info"));
                        drawInfoMessage(s)
  
-                       if(gametype == MAPINFO_TYPE_ARENA)
-                               s = _("^1Wait for your turn to join");
-                       else if(gametype == MAPINFO_TYPE_LMS)
+                       if(gametype == MAPINFO_TYPE_LMS)
                        {
                                entity sk;
                                sk = playerslots[player_localnum];
@@@ -4491,7 -4489,6 +4489,7 @@@ void HUD_QuickMenu_Close(
        HUD_QuickMenu_Buffer_Close();
  
        if(autocvar_hud_cursormode)
 +      if(!mv_active)
                setcursormode(0);
  }
  
@@@ -4649,7 -4646,7 +4647,7 @@@ float HUD_QuickMenu_InputEvent(float bI
        if(bInputType == 2)
                return false;
  
 -      if(!HUD_QuickMenu_IsOpened() || autocvar__hud_configure)
 +      if(!HUD_QuickMenu_IsOpened() || autocvar__hud_configure || mv_active)
                return false;
  
        if(bInputType == 3)
  }
  void HUD_QuickMenu_Mouse()
  {
 +      if(mv_active) return;
 +
        if(!mouseClicked)
        if(prevMouseClicked & S_MOUSE2)
        {
                return;
        }
  
 -      if not(autocvar_hud_cursormode)
 +      if(!autocvar_hud_cursormode)
        {
                mousepos = mousepos + getmousepos() * autocvar_menu_mouse_speed;
  
                                color = '1 1 1';
                        drawfill(panel_pos, eX * panel_size_x + eY * fontsize_y, color, .2, DRAWFLAG_NORMAL);
  
 -                      if(!mouseClicked && prevMouseClicked & S_MOUSE1)
 +                      if(!mouseClicked && (prevMouseClicked & S_MOUSE1))
                        {
                                float f;
                                if (entry_num < QUICKMENU_MAXLINES - 1)
@@@ -4802,7 -4797,6 +4800,7 @@@ void HUD_QuickMenu(void
                        HUD_QuickMenu_Close();
  
                if(!hud_draw_maximized) return;
 +              if(mv_active) return;
                //if(!autocvar_hud_panel_quickmenu) return; // autocvar exists only for conformity with other panels
                if(!hud_panel_quickmenu) return;
        }