From: FruitieX Date: Tue, 6 Jul 2010 11:57:19 +0000 (+0300) Subject: smaller, less annoying complain bubble (also easy way to ensure it doesnt go off... X-Git-Tag: xonotic-v0.1.0preview~457^2~9 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=24749aca82325a2884031002d87af638299ab8c4;p=xonotic%2Fxonotic-data.pk3dir.git smaller, less annoying complain bubble (also easy way to ensure it doesnt go off screen ;)) --- diff --git a/hud_wickedhud_default.cfg b/hud_wickedhud_default.cfg index c44fee689..4f0af352b 100644 --- a/hud_wickedhud_default.cfg +++ b/hud_wickedhud_default.cfg @@ -28,8 +28,8 @@ seta hud_weaponicons_size "0.040000 0.490000" "size of this panel" seta hud_weaponicons_number 1 "1 = show number of weapon, 2 = show bound key of weapon" seta hud_weaponicons_accuracy_yellow 40 "percentage at which the accuracy color is yellow" seta hud_weaponicons_complainbubble 1 "complain bubble (out of ammo, weapon not available etc)" -seta hud_weaponicons_complainbubble_size 1 "size multiplier of the complain bubble" seta hud_weaponicons_complainbubble_time 1 "time that a new entry stays until it fades out" +seta hud_weaponicons_complainbubble_padding -10 "padding for the complainbubble" seta hud_weaponicons_complainbubble_fadetime 0.25 "fade out time" seta hud_weaponicons_bg "border_weaponicons" "if set to something else than \"\" = override default background" seta hud_weaponicons_bg_color "" "if set to something else than \"\" = override default panel background color" diff --git a/qcsrc/client/autocvars.qh b/qcsrc/client/autocvars.qh index 2b63a77cc..a686ac5dc 100644 --- a/qcsrc/client/autocvars.qh +++ b/qcsrc/client/autocvars.qh @@ -52,7 +52,7 @@ var string autocvar_hud_weaponicons_bg_padding; var float autocvar_hud_weaponicons_accuracy_yellow; var float autocvar_hud_weaponicons_number; var float autocvar_hud_weaponicons_complainbubble; -var float autocvar_hud_weaponicons_complainbubble_size; +var float autocvar_hud_weaponicons_complainbubble_padding; var float autocvar_hud_weaponicons_complainbubble_time; var float autocvar_hud_weaponicons_complainbubble_fadetime; diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index b6e1f10eb..984d13e5d 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -1585,24 +1585,21 @@ void HUD_WeaponIcons(void) a = 0; } - vector complain_bubble_size = '100 50 0' * bound(0.25, autocvar_hud_weaponicons_complainbubble_size, 2); - drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), "weapon_complainbubble", complain_bubble_size, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); - string s; if(complain_weapon_type == 0) { - s = "Out of ammo for the"; + s = "Out of ammo"; color = '1 0 0'; } else if(complain_weapon_type == 1) { - s = "You don't have the"; + s = "Don't have"; color = '1 1 0'; } else { - s = "Map doesn't have the"; + s = "Unavailable"; color = '1 1 1'; } - drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + eX * 0.05 * complain_bubble_size_x + eY * (1/6) * complain_bubble_size_y + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), s, eX * 0.9 * complain_bubble_size_x + eY * 0.2 * complain_bubble_size_y, 0.2 * complain_bubble_size_y, color, panel_fg_alpha * a, DRAWFLAG_NORMAL); - drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) - complain_bubble_size + eX * 0.05 * complain_bubble_size_x + eY * (11/30) * complain_bubble_size_y + 0.5 * (eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows)), complain_weapon_name, eX * 0.9 * complain_bubble_size_x + eY * 0.25 * complain_bubble_size_y, 0.25 * complain_bubble_size_y, '1 0 0', panel_fg_alpha * a, DRAWFLAG_NORMAL); + drawpic_aspect_skin(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, "weapon_complainbubble", eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows) - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL); + drawstring_aspect(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows) + '1 1 0' * autocvar_hud_weaponicons_complainbubble_padding, s, eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows) - '2 2 0' * autocvar_hud_weaponicons_complainbubble_padding, mySize_y*(1/rows), '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL); } ++row;