X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fhud.qc;h=5acae2cff260d8365bae425992792f4d56f8a187;hb=ae51a4bf1f00b1f21b48703ac231d82b5a62cdbb;hp=e8309ef4e92a75cfcb633108c2471e9462b6c281;hpb=3f0620ef10b0c142cfb2f64d87af78c1243766c6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index e8309ef4e..5acae2cff 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1619,7 +1619,7 @@ void HUD_Weapons(void) } // TODO make this configurable - if(weaponorder_bypriority != autocvar_cl_weaponpriority) + if(weaponorder_bypriority != autocvar_cl_weaponpriority || !weaponorder[0]) { if(weaponorder_bypriority) strunzone(weaponorder_bypriority); @@ -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) @@ -2793,7 +2793,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s HUD_KillNotify_Push(s1, s2, 1, DEATH_HURTTRIGGER); if(alsoprint) print(sprintf(_("^1%s^1 was thrown into a world of hurt by %s\n"), s2, s1)); - } else if(type == DEATH_SBCRUSH) { + } else if(type == DEATH_VHCRUSH) { HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC); if(alsoprint) print (sprintf(_("^1%s^1 was crushed by %s\n"), s2, s1)); @@ -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) @@ -3001,7 +3001,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s print(sprintf(_("%s^7 returned the %s\n"), s1, s2)); } else if(type == INFO_CAPTUREFLAG) { HUD_KillNotify_Push(s1, s2, 0, INFO_CAPTUREFLAG); - print(sprintf(_("%1^7 captured the %s%s\n"), s1, s2, s3)); + print(sprintf(_("%s^7 captured the %s%s\n"), s1, s2, s3)); } } else if(msg == MSG_RACE) { if(type == RACE_SERVER_RECORD) { @@ -3142,7 +3142,8 @@ void HUD_Notify (void) height = mySize_y/entries; vector fontsize; - fontsize = '0.5 0.5 0' * height; + float fontheight = height * autocvar_hud_panel_notify_fontsize; + fontsize = '0.5 0.5 0' * fontheight; float a; float when; @@ -3316,7 +3317,7 @@ void HUD_Notify (void) } attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors); - pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height); + pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight))); weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height; if(s != "") @@ -3402,8 +3403,8 @@ void HUD_Notify (void) victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors); :hud_config_notifyprint width_attacker = stringwidth(attacker, TRUE, fontsize); - pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height); - pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height); + pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight))); + pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * ((0.5 * fontsize_y + i * height) + (0.5 * (height - fontheight))); weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height; if(s != "") @@ -3888,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; } @@ -3980,9 +3981,9 @@ void HUD_VoteWindow(void) drawcolorcodedstring_aspect(pos + eY * (2/8) * mySize_y, s, eX * mySize_x + eY * (1.75/8) * mySize_y, a, DRAWFLAG_NORMAL); // print the yes/no counts - s = sprintf(_("Yes (%s): %d"), getcommandkey("vyes", "vyes"), ftos(vote_yescount)); + s = sprintf(_("Yes (%s): %d"), getcommandkey("vyes", "vyes"), vote_yescount); drawstring_aspect(pos + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '0 1 0', a, DRAWFLAG_NORMAL); - s = sprintf(_("No (%s): %d"), getcommandkey("vno", "vno"), ftos(vote_nocount)); + s = sprintf(_("No (%s): %d"), getcommandkey("vno", "vno"), vote_nocount); drawstring_aspect(pos + eX * 0.5 * mySize_x + eY * (4/8) * mySize_y, s, eX * 0.5 * mySize_x + eY * (1.5/8) * mySize_y, '1 0 0', a, DRAWFLAG_NORMAL); // draw the progress bar backgrounds @@ -4957,7 +4958,7 @@ void HUD_InfoMessages(void) } else if(warmup_stage && !intermission && !spectatee_status) { - s = strcat("^2Press ^3%s^2 to end warmup", getcommandkey("ready", "ready")); + s = sprintf(_("^2Press ^3%s^2 to end warmup"), getcommandkey("ready", "ready")); drawInfoMessage(s) } @@ -4983,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) } } @@ -5096,9 +5097,9 @@ void HUD_ShowAcceleration(void) } if (acceleration > 0) - HUD_Panel_DrawProgressBar(pos, eX * (vid_conwidth - pos_x) + eY * sz, "statusbar", 0, 0, acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(pos, eX * (vid_conwidth - pos_x) + eY * sz, "accelbar", 0, 0, acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); else - HUD_Panel_DrawProgressBar(eY * pos_y, eX * pos_x + eY * sz, "statusbar", 0, 1, -acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); + HUD_Panel_DrawProgressBar(eY * pos_y, eX * pos_x + eY * sz, "accelbar", 0, 1, -acceleration * scale, rgb, alpha * autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL); } void HUD_Reset (void)