From: divverent Date: Sun, 6 Jan 2008 00:11:01 +0000 (+0000) Subject: make Nexuiz flag status icon position cvar defined X-Git-Tag: xonotic-v0.1.0preview~2581 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e0e2aee0d6a4ab50785d197743d2b97ade6ec487;p=xonotic%2Fdarkplaces.git make Nexuiz flag status icon position cvar defined git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7924 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sbar.c b/sbar.c index ce98923c..01ee3e96 100644 --- 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