]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Cvar sbar ring settings
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 20:18:46 +0000 (23:18 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Tue, 3 May 2011 20:18:46 +0000 (23:18 +0300)
data/defaultVT.cfg
data/qcsrc/client/sbar.qc

index 26acfb94b10b2fbf58d9751e2c64565fda3f22da..5eb0c8699389d32b150d05a938c180780aeacf62 100644 (file)
@@ -1159,6 +1159,14 @@ seta sbar_stomachboard_status_fade 1 "color fading speed of the stomach board st
 seta sbar_stomachboard_highlight_alpha 0.25 "alpha of the stomach board highlight"\r
 seta sbar_timer_increment 0 "1 = show elapsed time on the timer"\r
 seta sbar_timer_scale 1 "scale multiplier of the timer"\r
+seta sbar_ring1 1 "enables the first HUD ring"\r
+seta sbar_ring1_scale 100 "scale of the first HUD ring"\r
+seta sbar_ring1_text_scale 12 "scale of the text on the first HUD ring"\r
+seta sbar_ring1_alpha 0.75 "alpha of the first HUD ring"\r
+seta sbar_ring2 1 "enables the second HUD ring"\r
+seta sbar_ring2_scale 60 "scale of the second HUD ring"\r
+seta sbar_ring2_text_scale 10 "scale of the text on the second HUD ring"\r
+seta sbar_ring2_alpha 0.75 "alpha of the second HUD ring"\r
 seta sbar_vote_alreadyvoted_alpha 0.75 "alpha of the vote dialog after you have voted"\r
 \r
 // for menu server list (eventually make them have engine support?)\r
index f0586cdacd7f5c653030cb81968818de8a93cbe6..d004509863b7a3fb608613661f922ed791bcc9c1 100644 (file)
@@ -1982,16 +1982,17 @@ void Sbar_Ring()
 {\r
        vector ring_pos, ring1_color, ring2_color;\r
        vector text_pos, text1_size, text2_size;\r
-       float ring_alpha, ring1_size, ring1_clip, ring2_size, ring2_clip;\r
+       float ring1_alpha, ring2_alpha, ring1_size, ring1_clip, ring2_size, ring2_clip;\r
        string text1_msg, text2_msg;\r
 \r
        ring_pos_x = vid_conwidth / 2;\r
        ring_pos_y = vid_conheight / 1.375;\r
-       ring1_size = 100;\r
-       ring2_size = 60;\r
-       ring_alpha = sbar_alpha_fg * 1;\r
-       text1_size = '12 12 0';\r
-       text2_size = '10 10 0';\r
+       ring1_size = cvar("sbar_ring1_scale");\r
+       ring2_size = cvar("sbar_ring2_scale");\r
+       ring1_alpha = sbar_alpha_fg * cvar("sbar_ring1_alpha");\r
+       ring2_alpha = sbar_alpha_fg * cvar("sbar_ring2_alpha");\r
+       text1_size = '1 1 0' * cvar("sbar_ring1_text_scale");\r
+       text2_size = '1 1 0' * cvar("sbar_ring2_text_scale");\r
 \r
        switch(getstati(STAT_SBRING1_TYPE))\r
        {\r
@@ -2029,16 +2030,16 @@ void Sbar_Ring()
        ring1_clip = getstatf(STAT_SBRING1_CLIP);\r
        ring2_clip = getstatf(STAT_SBRING2_CLIP);\r
 \r
-       if(text1_msg != "")\r
+       if(text1_msg != "" && cvar("sbar_ring1"))\r
        {\r
-               DrawCircleClippedPic(ring_pos, ring1_size, "gfx/hud/sb_ring.tga", ring1_clip, ring1_color, ring_alpha, DRAWFLAG_ADDITIVE);\r
+               DrawCircleClippedPic(ring_pos, ring1_size, "gfx/hud/sb_ring.tga", ring1_clip, ring1_color, ring1_alpha, DRAWFLAG_ADDITIVE);\r
                text_pos_x = ring_pos_x - stringwidth(text1_msg, FALSE, text1_size) / 2;\r
                text_pos_y = ring_pos_y - ring1_size / 2;\r
                drawstring(text_pos, text1_msg, text1_size, ring1_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r
        }\r
-       if(text2_msg != "")\r
+       if(text2_msg != "" && cvar("sbar_ring2"))\r
        {\r
-               DrawCircleClippedPic(ring_pos, ring2_size, "gfx/hud/sb_ring.tga", ring2_clip, ring2_color, ring_alpha, DRAWFLAG_ADDITIVE);\r
+               DrawCircleClippedPic(ring_pos, ring2_size, "gfx/hud/sb_ring.tga", ring2_clip, ring2_color, ring2_alpha, DRAWFLAG_ADDITIVE);\r
                text_pos_x = ring_pos_x - stringwidth(text2_msg, FALSE, text2_size) / 2;\r
                text_pos_y = ring_pos_y + ring1_size / 2;\r
                drawstring(text_pos, text2_msg, text2_size, ring2_color, sbar_alpha_fg, DRAWFLAG_NORMAL);\r