X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/blobdiff_plain/bda0d2fef314d8d97c0372c7340f6fe4f3c6c371..24f95c67b704f2857e60701d53dbe03ce02133f3:/res/micropolis.tcl?ds=sidebyside diff --git a/res/micropolis.tcl b/res/micropolis.tcl index 50116fd..1f24900 100644 --- a/res/micropolis.tcl +++ b/res/micropolis.tcl @@ -246,19 +246,23 @@ set ScenarioButtons600x450 { { button scenario6 DoPickScenario "8" "" 259 319 105 94 "" @images/scenario6hilite-small.xpm "" } { button scenario7 DoPickScenario "7" "" 363 319 105 94 "" @images/scenario7hilite-small.xpm "" } { button scenario8 DoPickScenario "6" "" 468 319 105 94 "" @images/scenario8hilite-small.xpm "" } + { button map DoMap "" "" 267 24 180 150 "" "" "" } } set ScenarioButtons $ScenarioButtons1200x900 set ScenarioBackground "@images/background-micropolis.xpm" set ScenarioMapX 534 set ScenarioMapY 48 +set ScenarioMapFloatX -1 +set ScenarioMapFloatY -1 set ScenarioCityNameX 530 set ScenarioCityNameY 0 set ScenarioDescX 232 set ScenarioDescY 170 set ScenarioDescWidth 280 set ScenarioDescHeight 285 -set ScenarioDescFont Large +set ScenarioDescFont Medium +set EventLines 5 set screenwidth [winfo screenwidth .] set screenheight [winfo screenheight .] @@ -271,6 +275,8 @@ if {($screenwidth < $ScenarioPanelWidth) || set ScenarioPanelHeight 450 set ScenarioMapX -1 set ScenarioMapY -1 + set ScenarioMapFloatX 140 + set ScenarioMapFloatY 2 set ScenarioCityNameX 162 set ScenarioCityNameY 422 set ScenarioDescX 250 @@ -279,6 +285,7 @@ if {($screenwidth < $ScenarioPanelWidth) || set ScenarioDescHeight 210 set ScenarioDescFont Tiny set ScenarioButtons $ScenarioButtons600x450 + set EventLines 2 } # Disabled until we handle mouse events on the map itself. @@ -291,30 +298,39 @@ if {($screenwidth < $ScenarioPanelWidth) || set FontInfo { {Big { + {-*-helvetica-medium-r-normal-*-20-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-90-*} }} {Large { + {-*-helvetica-medium-r-normal-*-18-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-80-*} }} {Medium { + {-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-70-*} }} {Small { + {-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-60-*} }} {Narrow { + {-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-60-*} }} {Tiny { + {-*-helvetica-medium-r-normal-*-12-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-60-*} }} {Text { + {-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-70-*} }} {Message { + {-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-70-*} }} {Alert { + {-*-helvetica-medium-r-normal-*-14-*-*-*-*-*-*-*} {-*-dejavu lgc sans-medium-r-normal-*-70-*} }} } @@ -465,13 +481,6 @@ sprite train 1 sim ResetDynamic -# The next three lines have no effect on the OLPC, where we don't provide -# the font in res (because it's already in the system fonts). These lines -# are for other systems that lack the font. -set FontPath "[pwd]/res/dejavu-lgc" -system "xset -fp \"$FontPath\" >/dev/null 2>&1" -system "xset +fp \"$FontPath\" >/dev/null 2>&1" - # Ignore SIGCHLD for spawned sound-player childs, this should lead to them # being reaped by init signal ignore SIGCHLD @@ -3372,8 +3381,18 @@ proc UpdateScenarioButton {win data} { place $win.desc -x $ScenarioDescX -y $ScenarioDescY -width $ScenarioDescWidth -height $ScenarioDescHeight } + if {[lindex ${data} 2] == "DoMap"} { + global ScenarioMapFloatX ScenarioMapFloatY + if { $ScenarioMapFloatX != "-1" } { + place $win.canvas.view -x $ScenarioMapFloatX -y $ScenarioMapFloatY + } + } } else { catch {destroy $win.desc} + global ScenarioMapFloatX + if { $ScenarioMapFloatX != "-1" } { + catch {place forget $win.canvas.view} + } } if {$enabled} { if {$checked} {