]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
make Nexuiz flag status icon position cvar defined
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Jan 2008 00:11:01 +0000 (00:11 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 6 Jan 2008 00:11:01 +0000 (00:11 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7924 d7cf8633-e32d-0410-b094-e92efae38249

sbar.c

diff --git a/sbar.c b/sbar.c
index ce98923cb229dae3dc13ecfbe203956618488ef2..01ee3e96b55aa83ef45fc37f2cd5e9d51c2575d9 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -98,6 +98,7 @@ cvar_t sbar_alpha_fg = {CVAR_SAVE, "sbar_alpha_fg", "1", "opacity value of the s
 cvar_t sbar_hudselector = {CVAR_SAVE, "sbar_hudselector", "0", "selects which of the builtin hud layouts to use (meaning is somewhat dependent on gamemode, so nexuiz has a very different set of hud layouts than quake for example)"};
 cvar_t sbar_miniscoreboard_size = {CVAR_SAVE, "sbar_miniscoreboard_size", "-1", "sets the size of the mini deathmatch overlay in items, or disables it when set to 0, or sets it to a sane default when set to -1"};
 cvar_t sbar_flagstatus_right = {CVAR_SAVE, "sbar_flagstatus_right", "0", "moves Nexuiz flag status icons to the right"};
+cvar_t sbar_flagstatus_pos = {CVAR_SAVE, "sbar_flagstatus_pos", "115", "pixel position of the Nexuiz flag status icons, from the bottom"};
 
 cvar_t cl_deathscoreboard = {0, "cl_deathscoreboard", "1", "shows scoreboard (+showscores) while dead"};
 
@@ -388,7 +389,10 @@ void Sbar_Init (void)
        Cvar_RegisterVariable(&crosshair_size);
 
        if(gamemode == GAME_NEXUIZ)
+       {
                Cvar_RegisterVariable(&sbar_flagstatus_right); // this cvar makes no sense in other games
+               Cvar_RegisterVariable(&sbar_flagstatus_pos); // this cvar makes no sense in other games
+       }
 
        R_RegisterModule("sbar", sbar_start, sbar_shutdown, sbar_newmap);
 }
@@ -1282,14 +1286,14 @@ void Sbar_Draw (void)
                                {
                                        // The Impossible Combination[tm]
                                        // Can only happen in Key Hunt mode...
-                                       Sbar_DrawPic (x, -179, sb_items[14]);
+                                       Sbar_DrawPic (x, (vid_conheight.integer - sbar_y) - (sbar_flagstatus_pos.value + 128), sb_items[14]);
                                }
                                else
                                {
                                        if (redflag)
-                                               Sbar_DrawPic (x, -117, sb_items[redflag+10]);
+                                               Sbar_DrawPic (x, (vid_conheight.integer - sbar_y) - (sbar_flagstatus_pos.value + 64), sb_items[redflag+10]);
                                        if (blueflag)
-                                               Sbar_DrawPic (x, -177, sb_items[blueflag+14]);
+                                               Sbar_DrawPic (x, (vid_conheight.integer - sbar_y) - (sbar_flagstatus_pos.value + 128), sb_items[blueflag+14]);
                                }
 
                                // armor