From: MirceaKitsune Date: Thu, 15 Mar 2012 20:56:14 +0000 (+0200) Subject: Use a more correct way of toggling the HUD, and fix some missing menu dependencies X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ed7d639723bb673198e46439c458b361430c3b5;p=voretournament%2Fvoretournament.git Use a more correct way of toggling the HUD, and fix some missing menu dependencies --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index d501b1f3..82026d3b 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -1212,6 +1212,7 @@ seta hud_shownames_offset 52 "offset (along z-axis) tag from player origin by th seta hud_shownames_offset_healthsize 0.5 "offset (along z-axis) tag from player origin by this many units, based on player size" sbar_info_pos 50 +seta sbar_hudselector 1 "enables the HUD" seta sbar_alpha_bg 0.8 "alpha value of the HUD background" seta sbar_alpha_fg 1 "alpha value of the HUD foreground items" seta sbar_border_thickness 1 "scoreboard border thickness" diff --git a/data/qcsrc/client/View.qc b/data/qcsrc/client/View.qc index 557a0d9b..68d0bc27 100644 --- a/data/qcsrc/client/View.qc +++ b/data/qcsrc/client/View.qc @@ -1150,7 +1150,7 @@ void CSQC_UpdateView(float w, float h) hud = getstati(STAT_HUD); if(cvar("r_letterbox") == 0) - if(cvar("viewsize") < 120) + if(cvar("viewsize") < 120 && sbar_hudselector) CSQC_common_hud(); if(cvar("cl_flash_pickup")) diff --git a/data/qcsrc/client/hud.qc b/data/qcsrc/client/hud.qc index 0852aa6f..2bf72e48 100644 --- a/data/qcsrc/client/hud.qc +++ b/data/qcsrc/client/hud.qc @@ -1989,7 +1989,7 @@ void Sbar_Status() health_pos = bottom - '43 58 0'; armor_pos = bottom - '43 68 0'; - if (cvar("viewsize") <= 100) { + if (cvar("viewsize") <= 100 && sbar_hudselector) { if (teamplay) drawpic(bottom - '96 96 0', "gfx/hud/bg_status", '192 96 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color else { @@ -2142,7 +2142,7 @@ void Sbar_Timer() bgpos_z = 0; } - if (cvar("viewsize") <= 100) { // draw timer background when viewsize <= 100 + if (cvar("viewsize") <= 100 && sbar_hudselector) { // draw timer background when viewsize <= 100 if (teamplay) drawpic(bgpos, "gfx/hud/bg_timer", '120 30 0' * scale, GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // timer bg color = myteam color else { @@ -3168,7 +3168,7 @@ void Sbar_Draw (void) if(g_vore) // only when the vore system is active { // draw the stomach board - if (cvar("viewsize") <= 100) { + if (cvar("viewsize") <= 100 && sbar_hudselector) { if (teamplay) drawpic(bottomleft- '0 256 0', "gfx/hud/bg_stomach", '256 256 0', GetTeamRGB(myteam) * sbar_color_bg_team, sbar_alpha_bg, DRAWFLAG_NORMAL); // hud color = myteam color else { diff --git a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c index e1c7c2a4..4960b91e 100644 --- a/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c +++ b/data/qcsrc/menu/voret/dialog_multiplayer_playersetup_hud.c @@ -49,23 +49,24 @@ void fillVoretHudDialog(entity me) me.TD(me, 1, 4, makeVoretTextLabel(0, "HUD settings:")); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 2, e = makeVoretCheckBoxEx(100, 120, "viewsize", "Enable HUD")); + me.TD(me, 1, 2, e = makeVoretCheckBox(0, "sbar_hudselector", "Enable HUD")); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.8, e = makeVoretCheckBoxEx(100, 110, "viewsize", "Background:")); - setDependent(e, "viewsize", 0, 100); me.TD(me, 1, 3, e = makeVoretSlider(0, 1, 0.01, "sbar_alpha_bg")); - setDependent(e, "viewsize", 0, 100); + setDependent(e, "sbar_hudselector", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Default color:")); + setDependent(e, "sbar_hudselector", 1, 1); me.TD(me, 2, 2, e = makeVoretColorpickerString("sbar_color_bg", "sbar_color_bg")); + setDependent(e, "sbar_hudselector", 1, 1); me.TR(me); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeVoretTextLabel(0, "Team color:")); + setDependent(e, "sbar_hudselector", 1, 1); me.TD(me, 1, 3, e = makeVoretSlider(0.1, 1, 0.01, "sbar_color_bg_team")); - setDependent(e, "viewsize", 0, 100); + setDependent(e, "sbar_hudselector", 1, 1); me.TR(me); me.TR(me); me.TD(me, 1, 4, makeVoretTextLabel(0, "Ring settings:")); diff --git a/docs/TODO.txt b/docs/TODO.txt index 01d6b9ab..cfee2452 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -26,8 +26,6 @@ - 0.8: Make a new area in the Vore Temple map, I know where and how -- 0.7 | 0.8: Check if it's really ok to change the viewsize cvar to toggle the HUD in the menu - - 0.8 BUG: There is still an issue with the weapon model attempting to be attached to the stomach model, fix it - +0.8: Port some player models from Xonotic when they are properly done @@ -148,4 +146,6 @@ - 0.8: Turn the Grabber into an organic weapon, but keep metal parts like the fuel cases and weapon display -- 0.8: Colormod gibs when regurgitating them, although they are client side and the color cvars are server \ No newline at end of file +- 0.8: Colormod gibs when regurgitating them, although they are client side and the color cvars are server + +- 0.8: scoreboard doesn't show when HUD is disabled (sbar_hudselector is 0) \ No newline at end of file