1 # Window: Head (global controls & menus), for Unix Micropolis.
3 # Micropolis, Unix Version. This game was released for the Unix platform
4 # in or about 1990 and has been modified for inclusion in the One Laptop
5 # Per Child program. Copyright (C) 1989 - 2007 Electronic Arts Inc. If
6 # you need assistance with this program, you may contact:
7 # http://wiki.laptop.org/go/Micropolis or email micropolis@laptop.org.
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 3 of the License, or (at
12 # your option) any later version.
14 # This program is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details. You should have received a
18 # copy of the GNU General Public License along with this program. If
19 # not, see <http://www.gnu.org/licenses/>.
21 # ADDITIONAL TERMS per GNU GPL Section 7
23 # No trademark or publicity rights are granted. This license does NOT
24 # give you any right, title or interest in the trademark SimCity or any
25 # other Electronic Arts trademark. You may not distribute any
26 # modification of this program using the trademark SimCity or claim any
27 # affliation or association with Electronic Arts Inc. or its employees.
29 # Any propagation or conveyance of this program must include this
30 # copyright notice and these terms.
32 # If you convey this program (or any modifications of it) and assume
33 # contractual liability for the program to recipients of it, you agree
34 # to indemnify Electronic Arts for any liability that those contractual
35 # assumptions impose on Electronic Arts.
37 # You may not misrepresent the origins of this program; modified
38 # versions of the program must be marked as such and not identified as
39 # the original program.
41 # This disclaimer supplements the one included in the General Public
42 # License. TO THE FULLEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW, THIS
43 # PROGRAM IS PROVIDED TO YOU "AS IS," WITH ALL FAULTS, WITHOUT WARRANTY
44 # OF ANY KIND, AND YOUR USE IS AT YOUR SOLE RISK. THE ENTIRE RISK OF
45 # SATISFACTORY QUALITY AND PERFORMANCE RESIDES WITH YOU. ELECTRONIC ARTS
46 # DISCLAIMS ANY AND ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES,
47 # INCLUDING IMPLIED WARRANTIES OF MERCHANTABILITY, SATISFACTORY QUALITY,
48 # FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY
49 # RIGHTS, AND WARRANTIES (IF ANY) ARISING FROM A COURSE OF DEALING,
50 # USAGE, OR TRADE PRACTICE. ELECTRONIC ARTS DOES NOT WARRANT AGAINST
51 # INTERFERENCE WITH YOUR ENJOYMENT OF THE PROGRAM; THAT THE PROGRAM WILL
52 # MEET YOUR REQUIREMENTS; THAT OPERATION OF THE PROGRAM WILL BE
53 # UNINTERRUPTED OR ERROR-FREE, OR THAT THE PROGRAM WILL BE COMPATIBLE
54 # WITH THIRD PARTY SOFTWARE OR THAT ANY ERRORS IN THE PROGRAM WILL BE
55 # CORRECTED. NO ORAL OR WRITTEN ADVICE PROVIDED BY ELECTRONIC ARTS OR
56 # ANY AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY. SOME
57 # JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF OR LIMITATIONS ON IMPLIED
58 # WARRANTIES OR THE LIMITATIONS ON THE APPLICABLE STATUTORY RIGHTS OF A
59 # CONSUMER, SO SOME OR ALL OF THE ABOVE EXCLUSIONS AND LIMITATIONS MAY
66 if {[catch "toplevel $win -screen $display"]} {
67 puts stderr
"Couldn't open X11 display \"$display\"."
73 global HeadPanelHeight
76 global NoticePanelWidth
77 global NoticePanelHeight
79 set visual
[winfo screenvisual
$win]
80 set depth
[winfo screendepth
$win]
81 set screenwidth
[winfo screenwidth
$win]
82 set screenheight
[winfo screenheight
$win]
86 if {$screenwidth < $initialwidth} {
87 set initialwidth
$screenwidth
90 if {$screenheight < $initialheight} {
91 set initialheight
$screenheight
95 if {!(("$visual" == "pseudocolor") ||
96 ("$visual" == "truecolor") ||
97 (("$visual" == "staticgray") &&
100 puts stderr
"Micropolis can't find an appropriate visual on display \"$display\"."
105 set HeadWindows
[linsert $HeadWindows 0 $win]
109 LinkWindow
$win.head
$win
110 LinkWindow
$win.editor
{}
111 LinkWindow
$win.map
{}
112 LinkWindow
$win.graph
{}
113 LinkWindow
$win.budget
{}
114 LinkWindow
$win.evaluation
{}
115 LinkWindow
$win.splash
{}
116 LinkWindow
$win.scenario
{}
117 LinkWindow
$win.
file {}
118 LinkWindow
$win.config
{}
119 LinkWindow
$win.notice
{}
120 LinkWindow
$win.ask
{}
122 tk_bindForTraversal
$win
123 bind $win <F10
> {tk_firstMenu
%W
}
124 bind $win <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
126 wm title
$win "Micropolis Controls"
127 wm iconname
$win {Micropolis Controls
}
128 wm geometry
$win ${initialwidth
}x
${initialheight
}+0+0
129 #wm positionfrom $win user
131 wm maxsize
$win $screenwidth $screenheight
132 wm minsize
$win 100 100
133 wm protocol
$win delete
"DeleteHeadWindow $win ;"
134 wm fullscreen
$win on
136 global $win.postedMenu
140 tk_bindForTraversal
$win.col1
142 LinkWindow
$win.col1
$win.col1
145 -width $HeadPanelWidth\
146 -height $HeadPanelHeight
147 tk_bindForTraversal
$win.col1.w1
149 frame $win.col1.w1.f1
\
152 tk_bindForTraversal
$win.col1.w1.f1
153 bind $win.col1.w1.f1
<F10
> {tk_firstMenu
%W
}
154 bind $win.col1.w1.f1
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
156 SetHelp
$win.col1.w1.f1.micropolis Head.MicropolisMenu
158 menubutton $win.col1.w1.f1.micropolis
\
159 -menu $win.col1.w1.f1.micropolis.m
\
161 -font [Font
$win Medium
]\
162 -variable $win.postedMenu
163 tk_bindForTraversal
$win.col1.w1.f1.micropolis
164 bind $win.col1.w1.f1.micropolis
<F10
> {tk_firstMenu
%W
}
165 bind $win.col1.w1.f1.micropolis
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
167 tk_menus
$win $win.col1.w1.f1.micropolis
169 menu $win.col1.w1.f1.micropolis.m
\
170 -font [Font
$win Medium
]
171 tk_bindForTraversal
$win.col1.w1.f1.micropolis.m
172 bind $win.col1.w1.f1.micropolis.m
<F10
> {tk_firstMenu
%W
}
173 bind $win.col1.w1.f1.micropolis.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
174 $win.col1.w1.f1.micropolis.m add command
\
176 -command "UIShowPicture 300"
177 $win.col1.w1.f1.micropolis.m add command
\
179 -command "UISaveCity $win"
180 $win.col1.w1.f1.micropolis.m add command
\
181 -label {Save City as...
}\
182 -command "UISaveCityAs $win"
183 if {[sim MultiPlayerMode
]} {
184 $win.col1.w1.f1.micropolis.m add command
\
185 -label {Add Player...
}\
186 -command "UIShowPlayer $win"
188 $win.col1.w1.f1.micropolis.m add command
\
189 -label {Choose City
!}\
190 -command "UISelectCity $win"
191 $win.col1.w1.f1.micropolis.m add command
\
192 -label {Quit Playing
!}\
193 -command "UIQuit $win"
195 SetHelp
$win.col1.w1.f1.
options Head.OptionsMenu
197 menubutton $win.col1.w1.f1.
options\
198 -menu $win.col1.w1.f1.
options.m
\
200 -font [Font
$win Medium
]\
201 -variable $win.postedMenu
202 tk_bindForTraversal
$win.col1.w1.f1.
options
203 bind $win.col1.w1.f1.
options <F10
> {tk_firstMenu
%W
}
204 bind $win.col1.w1.f1.
options <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
206 tk_menus
$win $win.col1.w1.f1.
options
208 menu $win.col1.w1.f1.
options.m
\
209 -font [Font
$win Medium
]
210 tk_bindForTraversal
$win.col1.w1.f1.
options.m
211 bind $win.col1.w1.f1.
options.m
<F10
> {tk_firstMenu
%W
}
212 bind $win.col1.w1.f1.
options.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
213 $win.col1.w1.f1.
options.m add
checkbutton\
214 -label {Auto Budget
}\
215 -variable AutoBudget
\
216 -command {sim AutoBudget
$AutoBudget}
217 $win.col1.w1.f1.
options.m add
checkbutton\
218 -label {Auto Bulldoze
}\
219 -variable AutoBulldoze
\
220 -command {sim AutoBulldoze
$AutoBulldoze}
221 $win.col1.w1.f1.
options.m add
checkbutton\
224 -command {sim Disasters
$Disasters}
225 $win.col1.w1.f1.
options.m add
checkbutton\
228 -command {sim Sound
$Sound}
229 $win.col1.w1.f1.
options.m add
checkbutton\
231 -variable DoAnimation
\
232 -command {sim DoAnimation
$DoAnimation}
233 $win.col1.w1.f1.
options.m add
checkbutton\
235 -variable DoMessages
\
236 -command {sim DoMessages
$DoMessages}
237 $win.col1.w1.f1.
options.m add
checkbutton\
240 -command {sim DoNotices
$DoNotices}
242 SetHelp
$win.col1.w1.f1.disasters Head.DisastersMenu
244 menubutton $win.col1.w1.f1.disasters
\
245 -menu $win.col1.w1.f1.disasters.m
\
247 -font [Font
$win Medium
]\
248 -variable $win.postedMenu
249 tk_bindForTraversal
$win.col1.w1.f1.disasters
250 bind $win.col1.w1.f1.disasters
<F10
> {tk_firstMenu
%W
}
251 bind $win.col1.w1.f1.disasters
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
253 tk_menus
$win $win.col1.w1.f1.disasters
255 menu $win.col1.w1.f1.disasters.m
\
256 -font [Font
$win Medium
]
257 tk_bindForTraversal
$win.col1.w1.f1.disasters.m
258 bind $win.col1.w1.f1.disasters.m
<F10
> {tk_firstMenu
%W
}
259 bind $win.col1.w1.f1.disasters.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
260 $win.col1.w1.f1.disasters.m add command
\
262 -command "UIDisaster $win \"UIMakeMonster\" \"release a monster?\""
263 $win.col1.w1.f1.disasters.m add command
\
265 -command "UIDisaster $win \"sim MakeFire\" \"start a fire?\""
266 $win.col1.w1.f1.disasters.m add command
\
268 -command "UIDisaster $win \"sim MakeFlood\" \"bring on a flood?\""
269 $win.col1.w1.f1.disasters.m add command
\
271 -command "UIDisaster $win \"sim MakeMeltdown\" \"have a nuclear meltdown?\""
272 $win.col1.w1.f1.disasters.m add command
\
274 -command "UIDisaster $win \"sim MakeTornado\" \"spin up a tornado?\""
275 $win.col1.w1.f1.disasters.m add command
\
277 -command "UIDisaster $win \"sim MakeEarthquake\" \"cause an earthquake?\""
279 SetHelp
$win.col1.w1.f1.priority Head.PriorityMenu
281 menubutton $win.col1.w1.f1.priority
\
282 -menu $win.col1.w1.f1.priority.m
\
284 -font [Font
$win Medium
]\
285 -variable $win.postedMenu
286 tk_bindForTraversal
$win.col1.w1.f1.priority
287 bind $win.col1.w1.f1.priority
<F10
> {tk_firstMenu
%W
}
288 bind $win.col1.w1.f1.priority
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
290 tk_menus
$win $win.col1.w1.f1.priority
292 menu $win.col1.w1.f1.priority.m
\
293 -font [Font
$win Medium
]
294 tk_bindForTraversal
$win.col1.w1.f1.priority.m
295 bind $win.col1.w1.f1.priority.m
<F10
> {tk_firstMenu
%W
}
296 bind $win.col1.w1.f1.priority.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
297 $win.col1.w1.f1.priority.m add
radiobutton\
299 -command {SetPriority
4}\
302 $win.col1.w1.f1.priority.m add
radiobutton\
304 -command {SetPriority
3}\
307 $win.col1.w1.f1.priority.m add
radiobutton\
309 -command {SetPriority
2}\
312 $win.col1.w1.f1.priority.m add
radiobutton\
314 -command {SetPriority
1}\
317 $win.col1.w1.f1.priority.m add
radiobutton\
319 -command {SetPriority
0}\
323 SetHelp
$win.col1.w1.f1.windows Head.WindowsMenu
325 menubutton $win.col1.w1.f1.windows
\
326 -menu $win.col1.w1.f1.windows.m
\
328 -font [Font
$win Medium
]\
329 -variable $win.postedMenu
330 tk_bindForTraversal
$win.col1.w1.f1.windows
331 bind $win.col1.w1.f1.windows
<F10
> {tk_firstMenu
%W
}
332 bind $win.col1.w1.f1.windows
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
334 tk_menus
$win $win.col1.w1.f1.windows
336 menu $win.col1.w1.f1.windows.m
\
337 -font [Font
$win Medium
]
338 tk_bindForTraversal
$win.col1.w1.f1.windows.m
339 bind $win.col1.w1.f1.windows.m
<F10
> {tk_firstMenu
%W
}
340 bind $win.col1.w1.f1.windows.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
341 $win.col1.w1.f1.windows.m add command
\
343 -command "UIShowBudgetAndWait"
344 $win.col1.w1.f1.windows.m add command
\
346 -command "ShowEvaluationOf $win"
347 $win.col1.w1.f1.windows.m add command
\
349 -command "ShowGraphOf $win"
350 #$win.col1.w1.f1.windows.m add command\
352 # -command "ShowMapOf $win"
353 #$win.col1.w1.f1.windows.m add command\
355 # -command "ShowEditorOf $win"
356 #$win.col1.w1.f1.windows.m add command\
358 # -command "ShowFrobOf $win"
359 #$win.col1.w1.f1.windows.m add command\
361 # -command "NewMapOf $win"
362 #$win.col1.w1.f1.windows.m add command\
363 # -label {New Editor}\
364 # -command "NewEditorOf $win"
366 LinkWindow
$win.m0
$win.col1.w1.f1.micropolis.m
367 LinkWindow
$win.m1
$win.col1.w1.f1.
options.m
368 LinkWindow
$win.m2
$win.col1.w1.f1.disasters.m
369 LinkWindow
$win.m3
$win.col1.w1.f1.priority.m
370 LinkWindow
$win.m4
$win.col1.w1.f1.windows.m
372 LinkWindow
$win.b0
$win.col1.w1.f1.micropolis
373 LinkWindow
$win.b1
$win.col1.w1.f1.
options
374 LinkWindow
$win.b2
$win.col1.w1.f1.disasters
375 LinkWindow
$win.b3
$win.col1.w1.f1.priority
376 LinkWindow
$win.b4
$win.col1.w1.f1.windows
378 pack append $win.col1.w1.f1
\
379 $win.col1.w1.f1.micropolis
{left
frame nw
} \
380 $win.col1.w1.f1.
options {left
frame nw
} \
381 $win.col1.w1.f1.disasters
{left
frame nw
} \
382 $win.col1.w1.f1.priority
{left
frame nw
} \
383 $win.col1.w1.f1.windows
{left
frame nw
}
385 frame $win.col1.w1.f2
\
386 -background #BFBFBF \
390 frame $win.col1.w1.f2.f1
\
391 -background #BFBFBF \
395 frame $win.col1.w1.f2.f1.
frame \
396 -background #BFBFBF \
400 canvas $win.col1.w1.f2.f1.
frame.demand
\
403 -background #BFBFBF \
405 LinkWindow
$win.demand
$win.col1.w1.f2.f1.
frame.demand
406 $win.col1.w1.f2.f1.
frame.demand create
bitmap 41 4 \
408 -bitmap "@images/demandg.xpm" \
410 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
412 -fill [Color
$win #00ff00 #000000]
413 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
415 -fill [Color
$win #0000ff #000000]
416 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
418 -fill [Color
$win #ffff00 #000000]
419 $win.col1.w1.f2.f1.
frame.demand create
bitmap 0 4 \
421 -bitmap "@images/micropoliss.xpm" \
424 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<1> {TogglePause
}
425 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<2> {TogglePause
}
426 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<3> {TogglePause
}
427 $win.col1.w1.f2.f1.
frame.demand
bind picture
<1> "ToggleEvaluationOf $win"
428 $win.col1.w1.f2.f1.
frame.demand
bind picture
<2> "ToggleEvaluationOf $win"
429 $win.col1.w1.f2.f1.
frame.demand
bind picture
<3> "ToggleEvaluationOf $win"
430 $win.col1.w1.f2.f1.
frame.demand
bind r
<1> "ToggleEvaluationOf $win"
431 $win.col1.w1.f2.f1.
frame.demand
bind r
<2> "ToggleEvaluationOf $win"
432 $win.col1.w1.f2.f1.
frame.demand
bind r
<3> "ToggleEvaluationOf $win"
433 $win.col1.w1.f2.f1.
frame.demand
bind c
<1> "ToggleEvaluationOf $win"
434 $win.col1.w1.f2.f1.
frame.demand
bind c
<2> "ToggleEvaluationOf $win"
435 $win.col1.w1.f2.f1.
frame.demand
bind c
<3> "ToggleEvaluationOf $win"
436 $win.col1.w1.f2.f1.
frame.demand
bind i
<1> "ToggleEvaluationOf $win"
437 $win.col1.w1.f2.f1.
frame.demand
bind i
<2> "ToggleEvaluationOf $win"
438 $win.col1.w1.f2.f1.
frame.demand
bind i
<3> "ToggleEvaluationOf $win"
440 SetHelp
$win.col1.w1.f2.f1.
frame.demand Head.Demand
442 frame $win.col1.w1.f2.f1.
frame.graphframe
\
443 -background #BFBFBF \
447 graphview
$win.col1.w1.f2.f1.
frame.graphframe.graph
\
448 -background #BFBFBF \
449 -font [Font
$win Tiny
]
450 $win.col1.w1.f2.f1.
frame.graphframe.graph Range
10
451 $win.col1.w1.f2.f1.
frame.graphframe.graph Mask
7
452 LinkWindow
$win.graphview
$win.col1.w1.f2.f1.
frame.graphframe.graph
453 bind $win.col1.w1.f2.f1.
frame.graphframe.graph
<ButtonPress
> "ToggleGraphOf $win"
456 SetHelp
$win.col1.w1.f2.f1.
frame.graphframe.graph Head.Graph
458 pack append $win.col1.w1.f2.f1.
frame.graphframe
\
459 $win.col1.w1.f2.f1.
frame.graphframe.graph
{left expand fill
}
461 pack append $win.col1.w1.f2.f1.
frame \
462 $win.col1.w1.f2.f1.
frame.demand
{left
frame sw padx
4} \
463 $win.col1.w1.f2.f1.
frame.graphframe
{right
frame center expand fill
}
465 frame $win.col1.w1.f2.f1.
info\
466 -background #BFBFBF \
470 dateview
$win.col1.w1.f2.f1.
info.date
\
471 -background #BFBFBF \
473 -font [Font
$win Medium
]
474 LinkWindow
$win.date
$win.col1.w1.f2.f1.
info.date
476 SetHelp
$win.col1.w1.f2.f1.
info.date Head.Date
478 label $win.col1.w1.f2.f1.
info.fundslabel
\
479 -background #BFBFBF \
481 -font [Font
$win Medium
]\
485 LinkWindow
$win.funds
$win.col1.w1.f2.f1.
info.fundslabel
486 bind $win.col1.w1.f2.f1.
info.fundslabel
<ButtonPress
> "UIShowBudgetAndWait"
488 SetHelp
$win.col1.w1.f2.f1.
info.fundslabel Head.Funds
490 label $win.col1.w1.f2.f1.
info.rate
\
491 -background #BFBFBF \
493 -font [Font
$win Medium
]\
494 -text {Tax Rate
: 7%} \
497 LinkWindow
$win.taxlabel
$win.col1.w1.f2.f1.
info.rate
498 bind $win.col1.w1.f2.f1.
info.rate
<ButtonPress
> "UIShowBudgetAndWait"
501 scale $win.col1.w1.f2.f1.
info.
scale\
502 -background #BFBFBF \
503 -command {SetTaxRate
}\
506 -font [Font
$win Medium
]\
509 $win.col1.w1.f2.f1.
info.
scale set 7
510 LinkWindow
$win.taxrate
$win.col1.w1.f2.f1.
info.
scale
513 pack append $win.col1.w1.f2.f1.
info \
514 $win.col1.w1.f2.f1.
info.date
{top
frame nw
} \
515 $win.col1.w1.f2.f1.
info.fundslabel
{top
frame nw
} \
516 $win.col1.w1.f2.f1.
info.rate
{top
frame nw
} \
517 $win.col1.w1.f2.f1.
info.
scale {top
frame nw fill expand
}
519 pack append $win.col1.w1.f2.f1
\
520 $win.col1.w1.f2.f1.
frame {left
frame nw expand fill
} \
521 $win.col1.w1.f2.f1.
info {left
frame nw
}
523 frame $win.col1.w1.f2.f2
\
526 tk_bindForTraversal
$win.col1.w1.f2.f2
527 bind $win.col1.w1.f2.f2
<F10
> {tk_firstMenu
%W
}
528 bind $win.col1.w1.f2.f2
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
530 SetHelp
$win.col1.w1.f2.f2 Head.Log
532 scrollbar $win.col1.w1.f2.f2.scroll
\
533 -command "$win.col1.w1.f2.f2.text yview" \
536 SetHelp
$win.col1.w1.f2.f2.scroll Head.Scrollbar
538 text $win.col1.w1.f2.f2.
text \
539 -yscroll "$win.col1.w1.f2.f2.scroll set" \
545 -font [Font
$win Text
]
546 LinkWindow
$win.
text $win.col1.w1.f2.f2.
text
548 $win.col1.w1.f2.f2.
text tag configure status
\
549 -font [Font
$win Message
]
551 $win.col1.w1.f2.f2.
text tag configure
message \
552 -font [Font
$win Message
] \
553 -foreground #ffffff \
556 $win.col1.w1.f2.f2.
text tag configure alert
\
557 -font [Font
$win Alert
] \
558 -foreground [Color
$win #ff3f3f #000000]
560 pack append $win.col1.w1.f2.f2
\
561 $win.col1.w1.f2.f2.scroll
{left
frame center filly
} \
562 $win.col1.w1.f2.f2.
text {right
frame center fill expand
}
564 if {[sim MultiPlayerMode
]} {
565 frame $win.col1.w1.f2.f3
\
568 tk_bindForTraversal
$win.col1.w1.f2.f3
569 bind $win.col1.w1.f2.f3
<F10
> {tk_firstMenu
%W
}
570 bind $win.col1.w1.f2.f3
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
572 button $win.col1.w1.f2.f3.chat
\
573 -font [Font
$win Large
] \
576 LinkWindow
$win.chat
$win.col1.w1.f2.f3.chat
577 bind $win.col1.w1.f2.f3.chat
<1> {ChatDown
%W
}
578 bind $win.col1.w1.f2.f3.chat
<ButtonRelease-1
> {ChatUp
%W
}
580 SetHelp
$win.col1.w1.f2.f3.chat Head.Chat
582 entry $win.col1.w1.f2.f3.
entry \
587 -textvariable $win.col1.w1.f2.f3.
entry.value
\
588 -font [Font
$win Message
]
589 global $win.col1.w1.f2.f3.
entry.value
590 set $win.col1.w1.f2.f3.
entry.value
""
591 tk_bindForTraversal
$win.col1.w1.f2.f3.
entry
592 bind $win.col1.w1.f2.f3.
entry <F10
> {tk_firstMenu
%W
}
593 bind $win.col1.w1.f2.f3.
entry <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
594 bind $win.col1.w1.f2.f3.
entry <Return
> "DoEnterMessage %W %W.value"
595 bind $win.col1.w1.f2.f3.
entry <Escape
> "DoEvalMessage %W %W.value"
596 bind $win.col1.w1.f2.f3.
entry <Any-Enter
> {focus %W
}
597 LinkWindow
$win.
entry $win.col1.w1.f2.f3.
entry
599 SetHelp
$win.col1.w1.f2.f3.
entry Head.Entry
603 tk_bindForTraversal
$win.col1.w2
605 LinkWindow
$win.w2
$win.col1.w2
608 tk_bindForTraversal
$win.col1.w3
610 LinkWindow
$win.w3
$win.col1.w3
613 tk_bindForTraversal
$win.col2
615 LinkWindow
$win.col2
$win.col2
617 #frame $win.col2.x1 -width 400 -height 400
618 #tk_bindForTraversal $win.col2.x1
620 #LinkWindow $win.x1 $win.col2.x1
623 #tk_bindForTraversal $win.col2.x2
625 #LinkWindow $win.x2 $win.col2.x2
628 #tk_bindForTraversal $win.col2.x3
630 #LinkWindow $win.x3 $win.col2.x3
633 #tk_bindForTraversal $win.col2.x4
635 #LinkWindow $win.x4 $win.col2.x4
637 if {[sim MultiPlayerMode
]} {
639 pack append $win.col1.w1.f2.f3
\
640 $win.col1.w1.f2.f3.chat
{left
frame center padx
4} \
641 $win.col1.w1.f2.f3.
entry {left
frame center fillx expand padx
4}
643 pack append $win.col1.w1.f2
\
644 $win.col1.w1.f2.f1
{top
frame center fillx
} \
645 $win.col1.w1.f2.f2
{top
frame center expand fill
} \
646 $win.col1.w1.f2.f3
{top
frame center fillx
}
650 pack append $win.col1.w1.f2
\
651 $win.col1.w1.f2.f1
{top
frame center fillx
} \
652 $win.col1.w1.f2.f2
{top
frame center expand fill
}
656 pack append $win.col1.w1
\
657 $win.col1.w1.f1
{top
frame center fillx
} \
658 $win.col1.w1.f2
{top
frame center expand fill
}
661 # $win.col1 {left frame center filly} \
662 # $win.col2 {left frame center expand fill}
664 place configure
$win.col1
\
667 -width $HeadPanelWidth\
670 pack append $win.col1
\
671 $win.col1.w1
{top
frame nw fillx
} \
672 $win.col1.w2
{top
frame nw fillx
} \
673 $win.col1.w3
{bottom
frame sw fillx
}
675 #place configure $win.col1.w1\
678 # -width $HeadPanelWidth\
679 # -height $HeadPanelHeight
681 #place configure $win.col1.w2\
683 # -y $HeadPanelHeight\
684 # -width $MapPanelWidth\
685 # -height $MapPanelHeight
687 #place configure $win.col1.w3\
689 # -y [expr "$HeadPanelHeight + $MapPanelHeight"]\
690 # -width $NoticePanelWidth\
691 # -height [expr "$screenheight - ($HeadPanelHeight + $MapPanelHeight)"]
693 place configure
$win.col2
\
694 -x [expr "$HeadPanelWidth + 5"]\
697 -width [expr "($screenwidth - $HeadPanelWidth) - 5"]
699 proc resizeeditor
{win width
} {
700 global HeadPanelWidth
702 place configure
$win.col2
\
703 -width [expr "($width - $HeadPanelWidth) - 5"]
706 bind $win <Configure
> "resizeeditor $win %w"
708 #pack append $win.col2\
709 # $win.col2.x1 {top frame nw fillx} \
710 # $win.col2.x2 {top frame nw fillx} \
711 # $win.col2.x3 {top frame nw expand fill} \
712 # $win.col2.x4 {top frame nw fillx}
714 SetupSoundServer
$win