From c14c3585d56604ef18aa1d25c137bb31e8cd1d94 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 3 May 2011 17:54:53 +0300 Subject: [PATCH] Add text strings, which will be used later to describe what the ring is addressing --- data/qcsrc/client/sbar.qc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/data/qcsrc/client/sbar.qc b/data/qcsrc/client/sbar.qc index 7fa1280d..1b9c6f33 100644 --- a/data/qcsrc/client/sbar.qc +++ b/data/qcsrc/client/sbar.qc @@ -1980,14 +1980,24 @@ void Sbar_Timer() void Sbar_Ring() { - vector pos; + vector pos, text_pos, text_size; + float sz1, sz2; pos_x = vid_conwidth / 2; pos_y = vid_conheight / 1.375; pos_z = 0; - - DrawCircleClippedPic(pos, 100, "gfx/hud/sb_ring.tga", 0.85, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE); - - DrawCircleClippedPic(pos, 80, "gfx/hud/sb_ring.tga", 0.75, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE); + sz1 = 60; + sz2 = 40; + text_size = '10 10 0'; + + DrawCircleClippedPic(pos, sz1, "gfx/hud/sb_ring.tga", 0.85, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE); + text_pos_x = pos_x - stringwidth("Text 1 ssdfsdfdsfsdf", FALSE, text_size) / 2; + text_pos_y = pos_y - sz1 / 2 - vlen(text_size); + drawstring(text_pos, "Text 1 ssdfsdfdsfsdf", text_size, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_NORMAL); + + DrawCircleClippedPic(pos, sz2, "gfx/hud/sb_ring.tga", 0.75, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_ADDITIVE); + text_pos_x = pos_x - stringwidth("Text 2 3453rf234f", FALSE, text_size) / 2; + text_pos_y = pos_y + sz1 / 2 + vlen(text_size); + drawstring(text_pos, "Text 2 3453rf234f", text_size, '1 1 1', 1 * sbar_alpha_fg, DRAWFLAG_NORMAL); } void CSQC_Strength_Timer() { -- 2.39.2