]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote-tracking branch 'origin/terencehill/misc_bugfixes'
authorRudolf Polzer <divverent@alientrap.org>
Tue, 1 Mar 2011 17:49:08 +0000 (18:49 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 1 Mar 2011 17:49:08 +0000 (18:49 +0100)
qcsrc/client/hud.qc
qcsrc/menu/item/button.c
qcsrc/menu/item/slider.c
qcsrc/menu/menu.qc

index d55cfd86612c76b69034738b7bf0a7d714fe398f..30a925a4f8d815560f4ba87127ea6ed14e1d5244 100644 (file)
@@ -1823,7 +1823,7 @@ void HUD_Weapons(void)
 
                        string s;
                        if(complain_weapon_type == 0) {
-                               s = "Out of ammo";
+                               s = _("Out of ammo");
                                color = stov(autocvar_hud_panel_weapons_complainbubble_color_outofammo);
                        }
                        else if(complain_weapon_type == 1) {
@@ -2750,7 +2750,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                        }
                }
                else if(type == KILL_FIRST_BLOOD)
-                       print(sprintf("^1%s^1 drew first blood\n", s1));
+                       print(sprintf(_("^1%s^1 drew first blood\n"), s1));
                else if (type == DEATH_TELEFRAG) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_TELEFRAG);
                        if(gentle)
@@ -2910,7 +2910,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if (type == DEATH_SLIME) {
                        HUD_KillNotify_Push(s1, "", 0, DEATH_SLIME);
                        if(alsoprint)
-                               print (sprintf("^1%s^1 was slimed\n", s1));
+                               print (sprintf(_("^1%s^1 was slimed\n"), s1));
                } else if (type == DEATH_LAVA) {
                        HUD_KillNotify_Push(s1, "", 0, DEATH_LAVA);
                        if(alsoprint)
@@ -3889,7 +3889,7 @@ void HUD_VoteWindow(void)
        if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
        {
                vote_active = 1;
-               vote_called_vote = strzone(_("^2Name ^7instead of \"^1Unregistered player\" ^7in stats"));
+               vote_called_vote = strzone(_("^2Name ^7instead of \"^1Unregistered player^7\" in stats"));
         uid2name_dialog = 1;
        }
 
@@ -4984,7 +4984,7 @@ void HUD_InfoMessages(void)
                                        if (tm)
                                        if (tm.team != COLOR_SPECTATOR)
                                        if (tm.team_size == ts_max)
-                                               s = strcat(s, sprintf(" Press ^3%s%s to adjust", getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
+                                               s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
                                        drawInfoMessage(s)
                                }
                        }
index 527672d254f41acb6795a336f05da00d3ffb7e45..71ca11c7c3a439327f888e8edc605b7d6fa36e35 100644 (file)
@@ -74,13 +74,15 @@ float Button_mousePress(entity me, vector pos)
 }
 float Button_mouseRelease(entity me, vector pos)
 {
-       if(cvar("menu_sounds"))
-               localsound("sound/misc/menu2.wav");
        me.mouseDrag(me, pos); // verify coordinates
        if(me.pressed)
        {
                if not(me.disabled)
+               {
+                       if(cvar("menu_sounds"))
+                               localsound("sound/misc/menu2.wav");
                        me.onClick(me, me.onClickEntity);
+               }
                me.pressed = 0;
        }
        return 1;
index eb8e5cb4a128ca823f669425fa66b6f6fd2f59df..8861357b7700590438a82362ea8a7ece71a7a1fb 100644 (file)
@@ -239,11 +239,11 @@ float Slider_mousePress(entity me, vector pos)
 }
 float Slider_mouseRelease(entity me, vector pos)
 {
-       if(cvar("menu_sounds"))
-               localsound("sound/misc/menu2.wav");
        me.pressed = 0;
        if(me.disabled)
                return 0;
+       if(cvar("menu_sounds"))
+               localsound("sound/misc/menu2.wav");
        return 1;
 }
 void Slider_showNotify(entity me)
index 4f0283c93e6587436a4d2109a77e4392127232fa..0894856f1f9e27f0b72334a23940dcd86e88252c 100644 (file)
@@ -350,12 +350,12 @@ float m_allocatetooltipbox(vector pos)
        vector avoidplus, avoidminus;
        vector v;
 
-       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x) / conwidth;
-       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y) / conheight;
+       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
        avoidplus_z = 0;
 
-       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x) / conwidth + menuTooltipSize_x;
-       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y) / conheight + menuTooltipSize_y;
+       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize_x;
+       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize_y;
        avoidminus_z = 0;
 
        // bottom right