diff --git a/config/menus/maps.cfg b/config/menus/maps.cfg index e819333e6..4d7c97565 100644 --- a/config/menus/maps.cfg +++ b/config/menus/maps.cfg @@ -776,13 +776,63 @@ new_ui maps [ ui_stay_open [ octapaks [ ui_strut 0.5 ui_font super [ ui_center [ + show_force_button = 0 + if (&& (getclientpriv $getclientnum $vetolock) (=s (getmastermode 1) "veto")) [ + show_force_button = 1 + ] + + if (&& (>= $chosenmode 0) (stringlen $chosenmap)) [ - ui_button (? (isonline) "^fgVote" "^fgPlay") [if (isonline) [show_ui maps 2]; (? (= (gamemode) 1) (savewarnchk [start $chosenmap $chosenmode (chosenmuts)]) (start $chosenmap $chosenmode (chosenmuts))); mapsearch = ""] + // "Vote" button, allows to vote for a new game + ui_button (? (isonline) "^fgVote" "^fgPlay") [ + if (isonline) [ + showgui maps 2 + ] + if (= (gamemode) 1) [ + savewarnchk [ start $chosenmap $chosenmode (chosenmuts)] + ] [ + start $chosenmap $chosenmode (chosenmuts) + ] + mapsearch = "" + ] + + if $show_force_button [ + ui_strut 1.5 + // "Force" button, allows for forcing a new game + ui_button "^fzwyForce" [ + if (isonline) [ + showgui maps 2 + ] + if (= (gamemode 1)) [ + savewarnchk [ mapsexec $chosenmap $chosenmode (chosenmuts) ] + ] [ + mapsexec $chosenmap $chosenmode (chosenmuts) + ] + mapsearch = "" + ] + ] ] [ ui_text (? (isonline) "^fdVote" "^fdPlay") + + if $show_force_button [ + ui_strut 1.5 + ui_text "^fdForce" + ] ] ] ] + + ui_font "little" [ ui_center [ + if (&& (isonline) (getclientpriv $getclientnum $masterlock) (!=s (getmastermode 1) "veto")) [ + // Change mastermode from xx to yy button, only shown if "Force" button is not already shown + // and player has required privs to change mastermode + ui_button (format "Change mastermode from ^fg%1 ^fwto ^fzwyveto" (getmastermode 1)) [ + mastermode (! (getmastermode)) + ] + + ] + ] ] + ui_visible [ cases (at $guirolloveraction 0 ) "chosenmode" [