X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/micropolis/blobdiff_plain/6a5fa4e03967ab980cdc7ef96a42400bc29b4414..753d72ecb98f0d5f0543851fda4d246b4cc97ce9:/res/wmap.tcl?ds=inline diff --git a/res/wmap.tcl b/res/wmap.tcl index 73e7d6f..f6504f0 100644 --- a/res/wmap.tcl +++ b/res/wmap.tcl @@ -124,7 +124,7 @@ menubutton $win.topframe.zones\ LinkWindow $win.zones $win.topframe.zones tk_bindForTraversal $win.topframe.zones bind $win.topframe.zones {tk_firstMenu %W} -bind $win.topframe.zones {tk_traverseToMenu %W %A} +bind $win.topframe.zones {tk_traverseToMenu %W %A} tk_menus $win $win.topframe.zones SetHelp $win.topframe.zones Map.Zones @@ -133,7 +133,7 @@ menu $win.topframe.zones.m\ -font [Font $win Medium] tk_bindForTraversal $win.topframe.zones.m bind $win.topframe.zones.m {tk_firstMenu %W} -bind $win.topframe.zones.m {tk_traverseToMenu %W %A} +bind $win.topframe.zones.m {tk_traverseToMenu %W %A} $win.topframe.zones.m add radiobutton\ -label {All}\ -variable MapState.$win\ @@ -176,7 +176,7 @@ menubutton $win.topframe.overlays\ LinkWindow $win.overlays $win.topframe.overlays tk_bindForTraversal $win.topframe.overlays bind $win.topframe.overlays {tk_firstMenu %W} -bind $win.topframe.overlays {tk_traverseToMenu %W %A} +bind $win.topframe.overlays {tk_traverseToMenu %W %A} tk_menus $win $win.topframe.overlays SetHelp $win.topframe.overlays Map.Overlays @@ -185,7 +185,7 @@ menu $win.topframe.overlays.m\ -font [Font $win Medium] tk_bindForTraversal $win.topframe.overlays.m bind $win.topframe.overlays.m {tk_firstMenu %W} -bind $win.topframe.overlays.m {tk_traverseToMenu %W %A} +bind $win.topframe.overlays.m {tk_traverseToMenu %W %A} $win.topframe.overlays.m add radiobutton\ -label {Population Density}\ -variable MapState.$win\ @@ -232,6 +232,30 @@ bind $win.topframe.overlays.m {tk_traverseToMenu %W %A} -value 13\ -command "SetMapState $win 13" +button $win.topframe.hide\ + -text {Hide Map}\ + -font [Font $win Medium]\ + -borderwidth 1\ + -command "HideMap $win" \ + -relief flat +LinkWindow $win.hide $win.topframe.hide +tk_bindForTraversal $win.topframe.hide + +proc HideMap {win} { + pack unpack $win.centerframe + $win.topframe.hide configure \ + -text {Show Map}\ + -command "ShowMap $win" +} + +proc ShowMap {win} { + pack append $win\ + $win.centerframe {top frame center fill} + $win.topframe.hide configure \ + -text {Hide Map}\ + -command "HideMap $win" +} + label $win.topframe.legend\ -bitmap "@images/legendn.xpm" \ -font [Font $win Medium] @@ -240,6 +264,7 @@ LinkWindow $win.legend $win.topframe.legend pack append $win.topframe\ $win.topframe.zones {left frame nw} \ $win.topframe.overlays {left frame nw} \ + $win.topframe.hide {left frame nw} \ $win.topframe.legend {right frame ne} pack append $win\