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 {!(("$visual" == "pseudocolor") ||
87 ("$visual" == "truecolor") ||
88 (("$visual" == "staticgray") &&
91 puts stderr
"Micropolis can't find an appropriate visual on display \"$display\"."
96 set HeadWindows
[linsert $HeadWindows 0 $win]
100 LinkWindow
$win.head
$win
101 LinkWindow
$win.editor
{}
102 LinkWindow
$win.map
{}
103 LinkWindow
$win.graph
{}
104 LinkWindow
$win.budget
{}
105 LinkWindow
$win.evaluation
{}
106 LinkWindow
$win.splash
{}
107 LinkWindow
$win.scenario
{}
108 LinkWindow
$win.
file {}
109 LinkWindow
$win.config
{}
110 LinkWindow
$win.notice
{}
111 LinkWindow
$win.ask
{}
113 tk_bindForTraversal
$win
114 bind $win <F10
> {tk_firstMenu
%W
}
115 bind $win <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
117 wm title
$win "Micropolis Controls"
118 wm iconname
$win {Micropolis Controls
}
119 wm geometry
$win 1200x900
+0+0
120 #wm positionfrom $win user
122 wm maxsize
$win $screenwidth $screenheight
123 wm minsize
$win 100 100
124 wm protocol
$win delete
"DeleteHeadWindow $win ;"
125 wm fullscreen
$win on
127 global $win.postedMenu
131 tk_bindForTraversal
$win.col1
133 LinkWindow
$win.col1
$win.col1
136 -width $HeadPanelWidth\
137 -height $HeadPanelHeight
138 tk_bindForTraversal
$win.col1.w1
140 frame $win.col1.w1.f1
\
143 tk_bindForTraversal
$win.col1.w1.f1
144 bind $win.col1.w1.f1
<F10
> {tk_firstMenu
%W
}
145 bind $win.col1.w1.f1
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
147 SetHelp
$win.col1.w1.f1.micropolis Head.MicropolisMenu
149 menubutton $win.col1.w1.f1.micropolis
\
150 -menu $win.col1.w1.f1.micropolis.m
\
152 -font [Font
$win Medium
]\
153 -variable $win.postedMenu
154 tk_bindForTraversal
$win.col1.w1.f1.micropolis
155 bind $win.col1.w1.f1.micropolis
<F10
> {tk_firstMenu
%W
}
156 bind $win.col1.w1.f1.micropolis
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
158 tk_menus
$win $win.col1.w1.f1.micropolis
160 menu $win.col1.w1.f1.micropolis.m
\
161 -font [Font
$win Medium
]
162 tk_bindForTraversal
$win.col1.w1.f1.micropolis.m
163 bind $win.col1.w1.f1.micropolis.m
<F10
> {tk_firstMenu
%W
}
164 bind $win.col1.w1.f1.micropolis.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
165 $win.col1.w1.f1.micropolis.m add command
\
167 -command "UIShowPicture 300"
168 $win.col1.w1.f1.micropolis.m add command
\
170 -command "UISaveCity $win"
171 $win.col1.w1.f1.micropolis.m add command
\
172 -label {Save City as...
}\
173 -command "UISaveCityAs $win"
174 if {[sim MultiPlayerMode
]} {
175 $win.col1.w1.f1.micropolis.m add command
\
176 -label {Add Player...
}\
177 -command "UIShowPlayer $win"
179 $win.col1.w1.f1.micropolis.m add command
\
180 -label {Choose City
!}\
181 -command "UISelectCity $win"
182 $win.col1.w1.f1.micropolis.m add command
\
183 -label {Quit Playing
!}\
184 -command "UIQuit $win"
186 SetHelp
$win.col1.w1.f1.
options Head.OptionsMenu
188 menubutton $win.col1.w1.f1.
options\
189 -menu $win.col1.w1.f1.
options.m
\
191 -font [Font
$win Medium
]\
192 -variable $win.postedMenu
193 tk_bindForTraversal
$win.col1.w1.f1.
options
194 bind $win.col1.w1.f1.
options <F10
> {tk_firstMenu
%W
}
195 bind $win.col1.w1.f1.
options <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
197 tk_menus
$win $win.col1.w1.f1.
options
199 menu $win.col1.w1.f1.
options.m
\
200 -font [Font
$win Medium
]
201 tk_bindForTraversal
$win.col1.w1.f1.
options.m
202 bind $win.col1.w1.f1.
options.m
<F10
> {tk_firstMenu
%W
}
203 bind $win.col1.w1.f1.
options.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
204 $win.col1.w1.f1.
options.m add
checkbutton\
205 -label {Auto Budget
}\
206 -variable AutoBudget
\
207 -command {sim AutoBudget
$AutoBudget}
208 $win.col1.w1.f1.
options.m add
checkbutton\
209 -label {Auto Bulldoze
}\
210 -variable AutoBulldoze
\
211 -command {sim AutoBulldoze
$AutoBulldoze}
212 $win.col1.w1.f1.
options.m add
checkbutton\
215 -command {sim Disasters
$Disasters}
216 $win.col1.w1.f1.
options.m add
checkbutton\
219 -command {sim Sound
$Sound}
220 $win.col1.w1.f1.
options.m add
checkbutton\
222 -variable DoAnimation
\
223 -command {sim DoAnimation
$DoAnimation}
224 $win.col1.w1.f1.
options.m add
checkbutton\
226 -variable DoMessages
\
227 -command {sim DoMessages
$DoMessages}
228 $win.col1.w1.f1.
options.m add
checkbutton\
231 -command {sim DoNotices
$DoNotices}
233 SetHelp
$win.col1.w1.f1.disasters Head.DisastersMenu
235 menubutton $win.col1.w1.f1.disasters
\
236 -menu $win.col1.w1.f1.disasters.m
\
238 -font [Font
$win Medium
]\
239 -variable $win.postedMenu
240 tk_bindForTraversal
$win.col1.w1.f1.disasters
241 bind $win.col1.w1.f1.disasters
<F10
> {tk_firstMenu
%W
}
242 bind $win.col1.w1.f1.disasters
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
244 tk_menus
$win $win.col1.w1.f1.disasters
246 menu $win.col1.w1.f1.disasters.m
\
247 -font [Font
$win Medium
]
248 tk_bindForTraversal
$win.col1.w1.f1.disasters.m
249 bind $win.col1.w1.f1.disasters.m
<F10
> {tk_firstMenu
%W
}
250 bind $win.col1.w1.f1.disasters.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
251 $win.col1.w1.f1.disasters.m add command
\
253 -command "UIDisaster $win \"UIMakeMonster\" \"release a monster?\""
254 $win.col1.w1.f1.disasters.m add command
\
256 -command "UIDisaster $win \"sim MakeFire\" \"start a fire?\""
257 $win.col1.w1.f1.disasters.m add command
\
259 -command "UIDisaster $win \"sim MakeFlood\" \"bring on a flood?\""
260 $win.col1.w1.f1.disasters.m add command
\
262 -command "UIDisaster $win \"sim MakeMeltdown\" \"have a nuclear meltdown?\""
263 $win.col1.w1.f1.disasters.m add command
\
265 -command "UIDisaster $win \"sim MakeTornado\" \"spin up a tornado?\""
266 $win.col1.w1.f1.disasters.m add command
\
268 -command "UIDisaster $win \"sim MakeEarthquake\" \"cause an earthquake?\""
270 SetHelp
$win.col1.w1.f1.priority Head.PriorityMenu
272 menubutton $win.col1.w1.f1.priority
\
273 -menu $win.col1.w1.f1.priority.m
\
275 -font [Font
$win Medium
]\
276 -variable $win.postedMenu
277 tk_bindForTraversal
$win.col1.w1.f1.priority
278 bind $win.col1.w1.f1.priority
<F10
> {tk_firstMenu
%W
}
279 bind $win.col1.w1.f1.priority
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
281 tk_menus
$win $win.col1.w1.f1.priority
283 menu $win.col1.w1.f1.priority.m
\
284 -font [Font
$win Medium
]
285 tk_bindForTraversal
$win.col1.w1.f1.priority.m
286 bind $win.col1.w1.f1.priority.m
<F10
> {tk_firstMenu
%W
}
287 bind $win.col1.w1.f1.priority.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
288 $win.col1.w1.f1.priority.m add
radiobutton\
290 -command {SetPriority
4}\
293 $win.col1.w1.f1.priority.m add
radiobutton\
295 -command {SetPriority
3}\
298 $win.col1.w1.f1.priority.m add
radiobutton\
300 -command {SetPriority
2}\
303 $win.col1.w1.f1.priority.m add
radiobutton\
305 -command {SetPriority
1}\
308 $win.col1.w1.f1.priority.m add
radiobutton\
310 -command {SetPriority
0}\
314 SetHelp
$win.col1.w1.f1.windows Head.WindowsMenu
316 menubutton $win.col1.w1.f1.windows
\
317 -menu $win.col1.w1.f1.windows.m
\
319 -font [Font
$win Medium
]\
320 -variable $win.postedMenu
321 tk_bindForTraversal
$win.col1.w1.f1.windows
322 bind $win.col1.w1.f1.windows
<F10
> {tk_firstMenu
%W
}
323 bind $win.col1.w1.f1.windows
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
325 tk_menus
$win $win.col1.w1.f1.windows
327 menu $win.col1.w1.f1.windows.m
\
328 -font [Font
$win Medium
]
329 tk_bindForTraversal
$win.col1.w1.f1.windows.m
330 bind $win.col1.w1.f1.windows.m
<F10
> {tk_firstMenu
%W
}
331 bind $win.col1.w1.f1.windows.m
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
332 $win.col1.w1.f1.windows.m add command
\
334 -command "UIShowBudgetAndWait"
335 $win.col1.w1.f1.windows.m add command
\
337 -command "ShowEvaluationOf $win"
338 $win.col1.w1.f1.windows.m add command
\
340 -command "ShowGraphOf $win"
341 #$win.col1.w1.f1.windows.m add command\
343 # -command "ShowMapOf $win"
344 #$win.col1.w1.f1.windows.m add command\
346 # -command "ShowEditorOf $win"
347 #$win.col1.w1.f1.windows.m add command\
349 # -command "ShowFrobOf $win"
350 #$win.col1.w1.f1.windows.m add command\
352 # -command "NewMapOf $win"
353 #$win.col1.w1.f1.windows.m add command\
354 # -label {New Editor}\
355 # -command "NewEditorOf $win"
357 LinkWindow
$win.m0
$win.col1.w1.f1.micropolis.m
358 LinkWindow
$win.m1
$win.col1.w1.f1.
options.m
359 LinkWindow
$win.m2
$win.col1.w1.f1.disasters.m
360 LinkWindow
$win.m3
$win.col1.w1.f1.priority.m
361 LinkWindow
$win.m4
$win.col1.w1.f1.windows.m
363 LinkWindow
$win.b0
$win.col1.w1.f1.micropolis
364 LinkWindow
$win.b1
$win.col1.w1.f1.
options
365 LinkWindow
$win.b2
$win.col1.w1.f1.disasters
366 LinkWindow
$win.b3
$win.col1.w1.f1.priority
367 LinkWindow
$win.b4
$win.col1.w1.f1.windows
369 pack append $win.col1.w1.f1
\
370 $win.col1.w1.f1.micropolis
{left
frame nw
} \
371 $win.col1.w1.f1.
options {left
frame nw
} \
372 $win.col1.w1.f1.disasters
{left
frame nw
} \
373 $win.col1.w1.f1.priority
{left
frame nw
} \
374 $win.col1.w1.f1.windows
{left
frame nw
}
376 frame $win.col1.w1.f2
\
377 -background #BFBFBF \
381 frame $win.col1.w1.f2.f1
\
382 -background #BFBFBF \
386 frame $win.col1.w1.f2.f1.
frame \
387 -background #BFBFBF \
391 canvas $win.col1.w1.f2.f1.
frame.demand
\
394 -background #BFBFBF \
396 LinkWindow
$win.demand
$win.col1.w1.f2.f1.
frame.demand
397 $win.col1.w1.f2.f1.
frame.demand create
bitmap 41 4 \
399 -bitmap "@images/demandg.xpm" \
401 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
403 -fill [Color
$win #00ff00 #000000]
404 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
406 -fill [Color
$win #0000ff #000000]
407 $win.col1.w1.f2.f1.
frame.demand create rectangle
-10 -10 1 1 \
409 -fill [Color
$win #ffff00 #000000]
410 $win.col1.w1.f2.f1.
frame.demand create
bitmap 0 4 \
412 -bitmap "@images/micropoliss.xpm" \
415 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<1> {TogglePause
}
416 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<2> {TogglePause
}
417 $win.col1.w1.f2.f1.
frame.demand
bind micropolis
<3> {TogglePause
}
418 $win.col1.w1.f2.f1.
frame.demand
bind picture
<1> "ToggleEvaluationOf $win"
419 $win.col1.w1.f2.f1.
frame.demand
bind picture
<2> "ToggleEvaluationOf $win"
420 $win.col1.w1.f2.f1.
frame.demand
bind picture
<3> "ToggleEvaluationOf $win"
421 $win.col1.w1.f2.f1.
frame.demand
bind r
<1> "ToggleEvaluationOf $win"
422 $win.col1.w1.f2.f1.
frame.demand
bind r
<2> "ToggleEvaluationOf $win"
423 $win.col1.w1.f2.f1.
frame.demand
bind r
<3> "ToggleEvaluationOf $win"
424 $win.col1.w1.f2.f1.
frame.demand
bind c
<1> "ToggleEvaluationOf $win"
425 $win.col1.w1.f2.f1.
frame.demand
bind c
<2> "ToggleEvaluationOf $win"
426 $win.col1.w1.f2.f1.
frame.demand
bind c
<3> "ToggleEvaluationOf $win"
427 $win.col1.w1.f2.f1.
frame.demand
bind i
<1> "ToggleEvaluationOf $win"
428 $win.col1.w1.f2.f1.
frame.demand
bind i
<2> "ToggleEvaluationOf $win"
429 $win.col1.w1.f2.f1.
frame.demand
bind i
<3> "ToggleEvaluationOf $win"
431 SetHelp
$win.col1.w1.f2.f1.
frame.demand Head.Demand
433 frame $win.col1.w1.f2.f1.
frame.graphframe
\
434 -background #BFBFBF \
438 graphview
$win.col1.w1.f2.f1.
frame.graphframe.graph
\
439 -background #BFBFBF \
440 -font [Font
$win Tiny
]
441 $win.col1.w1.f2.f1.
frame.graphframe.graph Range
10
442 $win.col1.w1.f2.f1.
frame.graphframe.graph Mask
7
443 LinkWindow
$win.graphview
$win.col1.w1.f2.f1.
frame.graphframe.graph
444 bind $win.col1.w1.f2.f1.
frame.graphframe.graph
<ButtonPress
> "ToggleGraphOf $win"
447 SetHelp
$win.col1.w1.f2.f1.
frame.graphframe.graph Head.Graph
449 pack append $win.col1.w1.f2.f1.
frame.graphframe
\
450 $win.col1.w1.f2.f1.
frame.graphframe.graph
{left expand fill
}
452 pack append $win.col1.w1.f2.f1.
frame \
453 $win.col1.w1.f2.f1.
frame.demand
{left
frame sw padx
4} \
454 $win.col1.w1.f2.f1.
frame.graphframe
{right
frame center expand fill
}
456 frame $win.col1.w1.f2.f1.
info\
457 -background #BFBFBF \
461 dateview
$win.col1.w1.f2.f1.
info.date
\
462 -background #BFBFBF \
464 -font [Font
$win Medium
]
465 LinkWindow
$win.date
$win.col1.w1.f2.f1.
info.date
467 SetHelp
$win.col1.w1.f2.f1.
info.date Head.Date
469 label $win.col1.w1.f2.f1.
info.fundslabel
\
470 -background #BFBFBF \
472 -font [Font
$win Medium
]\
476 LinkWindow
$win.funds
$win.col1.w1.f2.f1.
info.fundslabel
477 bind $win.col1.w1.f2.f1.
info.fundslabel
<ButtonPress
> "UIShowBudgetAndWait"
479 SetHelp
$win.col1.w1.f2.f1.
info.fundslabel Head.Funds
481 label $win.col1.w1.f2.f1.
info.rate
\
482 -background #BFBFBF \
484 -font [Font
$win Medium
]\
485 -text {Tax Rate
: 7%} \
488 LinkWindow
$win.taxlabel
$win.col1.w1.f2.f1.
info.rate
489 bind $win.col1.w1.f2.f1.
info.rate
<ButtonPress
> "UIShowBudgetAndWait"
492 scale $win.col1.w1.f2.f1.
info.
scale\
493 -background #BFBFBF \
494 -command {SetTaxRate
}\
497 -font [Font
$win Medium
]\
500 $win.col1.w1.f2.f1.
info.
scale set 7
501 LinkWindow
$win.taxrate
$win.col1.w1.f2.f1.
info.
scale
504 pack append $win.col1.w1.f2.f1.
info \
505 $win.col1.w1.f2.f1.
info.date
{top
frame nw
} \
506 $win.col1.w1.f2.f1.
info.fundslabel
{top
frame nw
} \
507 $win.col1.w1.f2.f1.
info.rate
{top
frame nw
} \
508 $win.col1.w1.f2.f1.
info.
scale {top
frame nw fill expand
}
510 pack append $win.col1.w1.f2.f1
\
511 $win.col1.w1.f2.f1.
frame {left
frame nw expand fill
} \
512 $win.col1.w1.f2.f1.
info {left
frame nw
}
514 frame $win.col1.w1.f2.f2
\
517 tk_bindForTraversal
$win.col1.w1.f2.f2
518 bind $win.col1.w1.f2.f2
<F10
> {tk_firstMenu
%W
}
519 bind $win.col1.w1.f2.f2
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
521 SetHelp
$win.col1.w1.f2.f2 Head.Log
523 scrollbar $win.col1.w1.f2.f2.scroll
\
524 -command "$win.col1.w1.f2.f2.text yview" \
527 SetHelp
$win.col1.w1.f2.f2.scroll Head.Scrollbar
529 text $win.col1.w1.f2.f2.
text \
530 -yscroll "$win.col1.w1.f2.f2.scroll set" \
536 -font [Font
$win Text
]
537 LinkWindow
$win.
text $win.col1.w1.f2.f2.
text
539 $win.col1.w1.f2.f2.
text tag configure status
\
540 -font [Font
$win Message
]
542 $win.col1.w1.f2.f2.
text tag configure
message \
543 -font [Font
$win Message
] \
544 -foreground #ffffff \
547 $win.col1.w1.f2.f2.
text tag configure alert
\
548 -font [Font
$win Alert
] \
549 -foreground [Color
$win #ff3f3f #000000]
551 pack append $win.col1.w1.f2.f2
\
552 $win.col1.w1.f2.f2.scroll
{left
frame center filly
} \
553 $win.col1.w1.f2.f2.
text {right
frame center fill expand
}
555 if {[sim MultiPlayerMode
]} {
556 frame $win.col1.w1.f2.f3
\
559 tk_bindForTraversal
$win.col1.w1.f2.f3
560 bind $win.col1.w1.f2.f3
<F10
> {tk_firstMenu
%W
}
561 bind $win.col1.w1.f2.f3
<Mod2-Key
> {tk_traverseToMenu
%W
%A
}
563 button $win.col1.w1.f2.f3.chat
\
564 -font [Font
$win Large
] \
567 LinkWindow
$win.chat
$win.col1.w1.f2.f3.chat
568 bind $win.col1.w1.f2.f3.chat
<1> {ChatDown
%W
}
569 bind $win.col1.w1.f2.f3.chat
<ButtonRelease-1
> {ChatUp
%W
}
571 SetHelp
$win.col1.w1.f2.f3.chat Head.Chat
573 entry $win.col1.w1.f2.f3.
entry \
578 -textvariable $win.col1.w1.f2.f3.
entry.value
\
579 -font [Font
$win Message
]
580 global $win.col1.w1.f2.f3.
entry.value
581 set $win.col1.w1.f2.f3.
entry.value
""
582 tk_bindForTraversal
$win.col1.w1.f2.f3.
entry
583 bind $win.col1.w1.f2.f3.
entry <F10
> {tk_firstMenu
%W
}
584 bind $win.col1.w1.f2.f3.
entry <Mod2-Key
> {tk_traverseToMenu
%W
%A
}
585 bind $win.col1.w1.f2.f3.
entry <Return
> "DoEnterMessage %W %W.value"
586 bind $win.col1.w1.f2.f3.
entry <Escape
> "DoEvalMessage %W %W.value"
587 bind $win.col1.w1.f2.f3.
entry <Any-Enter
> {focus %W
}
588 LinkWindow
$win.
entry $win.col1.w1.f2.f3.
entry
590 SetHelp
$win.col1.w1.f2.f3.
entry Head.Entry
594 tk_bindForTraversal
$win.col1.w2
596 LinkWindow
$win.w2
$win.col1.w2
599 tk_bindForTraversal
$win.col1.w3
601 LinkWindow
$win.w3
$win.col1.w3
604 tk_bindForTraversal
$win.col2
606 LinkWindow
$win.col2
$win.col2
608 #frame $win.col2.x1 -width 400 -height 400
609 #tk_bindForTraversal $win.col2.x1
611 #LinkWindow $win.x1 $win.col2.x1
614 #tk_bindForTraversal $win.col2.x2
616 #LinkWindow $win.x2 $win.col2.x2
619 #tk_bindForTraversal $win.col2.x3
621 #LinkWindow $win.x3 $win.col2.x3
624 #tk_bindForTraversal $win.col2.x4
626 #LinkWindow $win.x4 $win.col2.x4
628 if {[sim MultiPlayerMode
]} {
630 pack append $win.col1.w1.f2.f3
\
631 $win.col1.w1.f2.f3.chat
{left
frame center padx
4} \
632 $win.col1.w1.f2.f3.
entry {left
frame center fillx expand padx
4}
634 pack append $win.col1.w1.f2
\
635 $win.col1.w1.f2.f1
{top
frame center fillx
} \
636 $win.col1.w1.f2.f2
{top
frame center expand fill
} \
637 $win.col1.w1.f2.f3
{top
frame center fillx
}
641 pack append $win.col1.w1.f2
\
642 $win.col1.w1.f2.f1
{top
frame center fillx
} \
643 $win.col1.w1.f2.f2
{top
frame center expand fill
}
647 pack append $win.col1.w1
\
648 $win.col1.w1.f1
{top
frame center fillx
} \
649 $win.col1.w1.f2
{top
frame center expand fill
}
652 # $win.col1 {left frame center filly} \
653 # $win.col2 {left frame center expand fill}
655 place configure
$win.col1
\
658 -width $HeadPanelWidth\
659 -height $screenheight
661 pack append $win.col1
\
662 $win.col1.w1
{top
frame nw fillx
} \
663 $win.col1.w2
{top
frame nw fillx
} \
664 $win.col1.w3
{bottom
frame sw fillx
}
666 #place configure $win.col1.w1\
669 # -width $HeadPanelWidth\
670 # -height $HeadPanelHeight
672 #place configure $win.col1.w2\
674 # -y $HeadPanelHeight\
675 # -width $MapPanelWidth\
676 # -height $MapPanelHeight
678 #place configure $win.col1.w3\
680 # -y [expr "$HeadPanelHeight + $MapPanelHeight"]\
681 # -width $NoticePanelWidth\
682 # -height [expr "$screenheight - ($HeadPanelHeight + $MapPanelHeight)"]
684 place configure
$win.col2
\
685 -x [expr "$HeadPanelWidth + 5"]\
690 #pack append $win.col2\
691 # $win.col2.x1 {top frame nw fillx} \
692 # $win.col2.x2 {top frame nw fillx} \
693 # $win.col2.x3 {top frame nw expand fill} \
694 # $win.col2.x4 {top frame nw fillx}
696 SetupSoundServer
$win