diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 0633747e..5e36ea2e 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -332,7 +332,7 @@ menuitemcheckbox " Stats " "(= $hidestats 0)" "hidestats (= $arg1 0)" menuitemcheckbox " Gun " "$hudgun" "hudgun $arg1" menuitemcheckbox " Radar " "(= $hideradar 0)" "hideradar (= $arg1 0)" menuitemcheckbox " Team icon " "(= $hideteam 0)" "hideteam (= $arg1 0)" -menuitemcheckbox " Votes " "(= $hidevote 0)" "hidevote (= $arg1 0)" +menuitemslider " Votes " 0 2 [$hidevote] 1 ["always" "until voted" "never"] [hidevote $arg1] menuitemcheckbox " Icons " "(= $hidehudequipment 0)" "hidehudequipment (= $arg1 0)" menuitemcheckbox " Console " "(= $hideconsole 0)" "hideconsole (= $arg1 0)" menuitemcheckbox " Spectator info " "(= $hidespecthud 0)" "hidespecthud (= $arg1 0)" diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index 7e1e91cd..d7e153e5 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -74,7 +74,7 @@ VARP(hideteam, 0, 0, 1); VARP(radarres, 1, 64, 1024); VARP(radarentsize, 1, 4, 64); VARP(hidectfhud, 0, 0, 1); -VARP(hidevote, 0, 0, 1); +VARP(hidevote, 0, 0, 2); VARP(hidehudmsgs, 0, 0, 1); VARP(hidehudequipment, 0, 0, 1); VARP(hideconsole, 0, 0, 1); @@ -585,11 +585,11 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat draw_textf("evt %d", left, top+320, xtraverts); } - if(!hidevote && multiplayer(false)) + if(hidevote < 2 && multiplayer(false)) { extern votedisplayinfo *curvote; - if(curvote && curvote->millis >= totalmillis) + if(curvote && curvote->millis >= totalmillis && !(hidevote == 1 && curvote->localplayervoted && curvote->result == VOTE_NEUTRAL)) { const int left = 20*2, top = VIRTH; draw_textf("%s called a vote:", left, top+240, curvote->owner ? colorname(curvote->owner) : ""); @@ -603,7 +603,8 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat { case VOTE_NEUTRAL: drawvoteicon(left, top, 0, 0, true); - draw_textf("\f3press F1/F2 to vote yes or no", left, top+560); + if(!curvote->localplayervoted) + draw_textf("\f3press F1/F2 to vote yes or no", left, top+560); break; default: drawvoteicon(left, top, (curvote->result-1)&1, 1, false);