From 5a6a8ae5829f6f2836cb58d35629c5fa1f7eb4ba Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sat, 26 Jan 2008 22:15:41 +0100 Subject: [PATCH] show description (including time limit) when hovering over a scenario --- res/micropolis.tcl | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/res/micropolis.tcl b/res/micropolis.tcl index e84b3dc..250ebf2 100644 --- a/res/micropolis.tcl +++ b/res/micropolis.tcl @@ -3310,12 +3310,33 @@ proc UpdateScenarioButtonID {win id} { proc UpdateScenarioButton {win data} { + global Messages + set type [lindex $data 0] set id [lindex $data 1] set over [WindowLink $win.$id.over] set enabled [WindowLink $win.$id.enabled] set checked [WindowLink $win.$id.checked] #echo "WIN $win TYPE $type ID $id OVER $over ENABLED $enabled CHECKED $checked" + if {$over} { + if {[lindex ${data} 2] == "DoPickScenario"} { + catch {text $win.desc \ + -borderwidth 2 \ + -relief flat \ + -wrap word \ + -state normal \ + -font [Font $win Large]} + + $win.desc configure -state normal + $win.desc delete 0.0 end + $win.desc insert end "[lindex $Messages([lindex ${data} 3]) 1]\n\n[lindex $Messages([lindex ${data} 3]) 2]" + $win.desc configure -state disabled + + place $win.desc -x 232 -y 170 -width 280 -height 285 + } + } else { + catch {destroy $win.desc} + } if {$enabled} { if {$checked} { if {$over} { -- 2.39.5