From: terencehill Date: Mon, 10 Aug 2015 23:50:02 +0000 (+0200) Subject: Center icon when item has no time X-Git-Tag: xonotic-v0.8.1~12^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5f86399851c920638ee8f8f166b44c7c295d4aa5;p=xonotic%2Fxonotic-data.pk3dir.git Center icon when item has no time --- diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 585fd6ec3..55de7b7f5 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -4720,6 +4720,8 @@ void DrawItemsTimeItem(vector myPos, vector mySize, float ar, float itemcode, fl if(t > 0 && autocvar_hud_panel_itemstime_text) drawstring_aspect(numpos, ftos(t), eX * ((ar - 1)/ar) * mySize_x + eY * mySize_y, color, panel_fg_alpha, DRAWFLAG_NORMAL); + else + picpos.x = myPos.x + mySize.x / 2 - mySize.y / 2; if(item_availableTime) drawpic_aspect_skin_expanding(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL, item_availableTime); drawpic_aspect_skin(picpos, GetItemsTimePicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * picalpha, DRAWFLAG_NORMAL);