From: Michael Gernoth Date: Sat, 26 Jan 2008 13:13:36 +0000 (+0100) Subject: Add "Pause" to Priority menu X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/commitdiff_plain/e555720e8e5157017ff6ae6e68a550a84b9a22db Add "Pause" to Priority menu --- diff --git a/res/micropolis.tcl b/res/micropolis.tcl index dc7d352..773ceb3 100644 --- a/res/micropolis.tcl +++ b/res/micropolis.tcl @@ -97,6 +97,7 @@ set DemandCom 0 set DemandInd 0 set Priority 2 set Time 3 +set Pause 0 set AutoGoto 1 set AutoBudget 1 set Disasters 1 @@ -4917,12 +4918,14 @@ proc oops {} { proc TogglePause {} { - global State + global State Pause if {"$State" != "play" || [sim Speed]} { sim Speed 0 + set Pause 1 } else { sim Speed 3 + set Pause 0 } MakeRunningSound } diff --git a/res/whead.tcl b/res/whead.tcl index e782f90..5432324 100644 --- a/res/whead.tcl +++ b/res/whead.tcl @@ -324,6 +324,10 @@ bind $win.col1.w1.f1.priority.m {tk_traverseToMenu %W %A} -command {SetPriority 0}\ -value {0}\ -variable Priority + $win.col1.w1.f1.priority.m add checkbutton\ + -label {Pause}\ + -command {TogglePause}\ + -variable Pause SetHelp $win.col1.w1.f1.windows Head.WindowsMenu