chiark / gitweb /
gui: show unknown movpos with black-on-white labels
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 8 Jan 2011 21:33:01 +0000 (21:33 +0000)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 8 Jan 2011 21:33:01 +0000 (21:33 +0000)
hostside/gui

index 13a73feea17c0641997a5a399174a24a7434e682..cda538dadb573b3ab187f853ca54119107449a70 100755 (executable)
@@ -203,14 +203,13 @@ proc movpos-button-setdisplay {mid} {
     #   whether a train's plan includes a different position
     #   whether autopoint
     movpos-button-gvars $mid
-    set fg white
-    set bg black
-    $w configure -background $bg -foreground $fg \
-           -activebackground $bg -activeforeground $fg
     switch -exact $posn {
-       ? { manyset [lindex $poslocs 2] x y }
-       default { manyset [lindex $poslocs $posn] x y }
+       ?       { set poslocn 2;     set fg black; set bg white }
+       default { set poslocn $posn; set fg white; set bg black }
     }
+    $w configure -background $bg -foreground $fg \
+           -activebackground $bg -activeforeground $fg
+    manyset [lindex $poslocs $poslocn] x y
     place $w -anchor center -x $x -y $y
 }