]> git.zerfleddert.de Git - micropolis/blob - res/weditor.tcl
src/tk/makefile: Micropolis build fixes for recent macOS
[micropolis] / res / weditor.tcl
1 # Window: Editor, for Unix Micropolis.
2 #
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.
8 #
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.
13 #
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/>.
20 #
21 # ADDITIONAL TERMS per GNU GPL Section 7
22 #
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.
28 #
29 # Any propagation or conveyance of this program must include this
30 # copyright notice and these terms.
31 #
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.
36 #
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.
40 #
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
60 # NOT APPLY TO YOU.
61 global EditorWindows
62 set n [Unique]
63 set parent [WindowLink $head.col2]
64 set win $parent.editor$n
65 set EditorWindows [linsert $EditorWindows 0 $win]
66
67 global Skip.$win
68 set Skip.$win 0
69 global AutoGoto.$win
70 set AutoGoto.$win 0
71 global Controls.$win
72 set Controls.$win 1
73 global Overlay.$win
74 set Overlay.$win 0
75 global DynamicFilter.$win
76 set DynamicFilter.$win 0
77
78 LinkWindow $head.editor $win
79 LinkWindow $win.head $head
80 LinkWindow $win.parent $parent
81 LinkWindow $win.top $win
82
83 catch "destroy $win"
84 frame $win
85
86 SetHelp $win Editor
87
88 bind $win <Visibility> {[WindowLink %W.view] Visible [string compare %s FullyObscured]}
89 bind $win <Map> {[WindowLink %W.view] Visible 1}
90 bind $win <Unmap> {[WindowLink %W.view] Visible 0}
91 # $head.editor points to most recently created or entered editor
92 bind $win <Enter> "LinkWindow $head.editor $win"
93
94 global CityName
95
96 #wm title $win "Micropolis Editor"
97 #wm iconname $win $CityName
98 #wm group $win $head
99 #wm geometry $win 550x535+440+5
100 #wm positionfrom $win user
101 #wm withdraw $win
102 #wm maxsize $win 5000 5000
103 #wm minsize $win 32 32
104 #wm protocol $win delete "DeleteWindow editor EditorWindows"
105
106 frame $win.topframe\
107 -borderwidth 0
108
109 frame $win.topframe.controls\
110 -borderwidth 1\
111 -relief raised
112
113 if {0} {
114 menubutton $win.topframe.controls.update\
115 -menu $win.topframe.controls.update.m\
116 -text {Display}\
117 -font [Font $win Medium]\
118 -variable $win.postedMenu\
119 -borderwidth 1\
120 -relief flat
121 tk_bindForTraversal $win.topframe.controls.update
122 bind $win.topframe.controls.update <F10> {tk_firstMenu %W}
123 bind $win.topframe.controls.update <Alt-Key> {tk_traverseToMenu %W %A}
124 tk_menus $win $win.topframe.controls.update
125
126 SetHelp $win.topframe.controls.update Editor.Display
127
128 menu $win.topframe.controls.update.m\
129 -font [Font $win Medium]
130 tk_bindForTraversal $win.topframe.controls.update.m
131 bind $win.topframe.controls.update.m <F10> {tk_firstMenu %W}
132 bind $win.topframe.controls.update.m <Alt-Key> {tk_traverseToMenu %W %A}
133 $win.topframe.controls.update.m add radiobutton\
134 -label {Always}\
135 -variable Skip.$win\
136 -value 0\
137 -command "SetEditorSkip $win 0"
138 $win.topframe.controls.update.m add radiobutton\
139 -label {Often}\
140 -variable Skip.$win\
141 -value 1\
142 -command "SetEditorSkip $win 2"
143 $win.topframe.controls.update.m add radiobutton\
144 -label {Sometimes}\
145 -variable Skip.$win\
146 -value 2\
147 -command "SetEditorSkip $win 8"
148 $win.topframe.controls.update.m add radiobutton\
149 -label {Seldom}\
150 -variable Skip.$win\
151 -value 3\
152 -command "SetEditorSkip $win 64"
153 $win.topframe.controls.update.m add radiobutton\
154 -label {Rarely}\
155 -variable Skip.$win\
156 -value 4\
157 -command "SetEditorSkip $win 256"
158 }
159
160 menubutton $win.topframe.controls.options\
161 -menu $win.topframe.controls.options.m\
162 -text {Options}\
163 -font [Font $win Medium]\
164 -variable $win.postedMenu\
165 -borderwidth 1\
166 -relief flat
167 tk_bindForTraversal $win.topframe.controls.options
168 bind $win.topframe.controls.options <F10> {tk_firstMenu %W}
169 bind $win.topframe.controls.options <Alt-Key> {tk_traverseToMenu %W %A}
170 tk_menus $win $win.topframe.controls.options
171
172 SetHelp $win.topframe.controls.options Editor.Options
173
174 menu $win.topframe.controls.options.m\
175 -font [Font $win Medium]
176 tk_bindForTraversal $win.topframe.controls.options.m
177 bind $win.topframe.controls.options.m <F10> {tk_firstMenu %W}
178 bind $win.topframe.controls.options.m <Alt-Key> {tk_traverseToMenu %W %A}
179 $win.topframe.controls.options.m add checkbutton\
180 -label {Auto Goto}\
181 -variable AutoGoto.$win\
182 -command "SetEditorAutoGoto $win \$\{AutoGoto.$win\}"
183 $win.topframe.controls.options.m add checkbutton\
184 -label {Pallet Panel}\
185 -variable Controls.$win\
186 -command "SetEditorControls $win \$\{Controls.$win\}"
187 $win.topframe.controls.options.m add checkbutton\
188 -label {Chalk Overlay}\
189 -variable Overlay.$win\
190 -command "SetEditorOverlay $win \$\{Overlay.$win\}"
191 # Disabled dynamic fulter for now.
192 #$win.topframe.controls.options.m add checkbutton\
193 # -label {Dynamic Filter}\
194 # -variable DynamicFilter.$win\
195 # -command "SetEditorDynamicFilter $win \$\{DynamicFilter.$win\}"
196
197 pack append $win.topframe.controls\
198 $win.topframe.controls.options {left frame ne}
199
200 # $win.topframe.controls.update {left frame ne}
201
202 label $win.topframe.messagelabel\
203 -borderwidth 1\
204 -relief raised\
205 -font [Font $win Large]\
206 -text {}\
207 -width 23
208 LinkWindow $win.message $win.topframe.messagelabel
209
210 SetHelp $win.message Editor.Message
211
212 pack append $win.topframe\
213 $win.topframe.controls {left frame ne} \
214 $win.topframe.messagelabel {left frame ne expand fill}
215
216 frame $win.centerframe\
217 -cursor hand2\
218 -borderwidth 1\
219 -relief sunken
220
221 SetHelp $win.centerframe Editor.View
222
223 editorview $win.centerframe.view\
224 -font [Font $win Big]
225 LinkWindow $win.view $win.centerframe.view
226 LinkWindow $win.centerframe.view.top $win
227
228 BindEditorButtons $win.centerframe.view
229
230 bind $win.centerframe.view <Any-Enter> {focus %W}
231
232 if {[sim MultiPlayerMode]} {
233
234 set entry [WindowLink $head.entry]
235 bind $win.centerframe.view <Any-KeyPress> "
236 if {\"%A\" != \"\"} {
237 $entry insert cursor %A
238 tk_entrySeeCaret $entry
239 }
240 "
241
242 bind $win.centerframe.view <Delete> "tk_entryDelPress $entry"
243 bind $win.centerframe.view <BackSpace> "tk_entryDelPress $entry"
244 bind $win.centerframe.view <Control-h> "tk_entryDelPress $entry"
245 bind $win.centerframe.view <Control-d> "tk_textCutPress $entry"
246 bind $win.centerframe.view <Control-u> "tk_entryDelLine $entry"
247 bind $win.centerframe.view <Control-v> "tk_entryCopyPress $entry"
248 bind $win.centerframe.view <Control-w> "tk_entryBackword $entry; tk_entrySeeCaret $entry"
249 bind $win.centerframe.view <Return> "DoEnterMessage $entry $entry.value"
250 bind $win.centerframe.view <Escape> "DoEvalMessage $entry $entry.value"
251
252 } else {
253
254 bind $win.centerframe.view <KeyPress> {EditorKeyDown %W %K}
255 bind $win.centerframe.view <KeyRelease> {EditorKeyUp %W %K}
256
257 }
258
259 bind $win.centerframe.view <Up> "%W PanBy 0 -16 ; %W TweakCursor"
260 bind $win.centerframe.view <Down> "%W PanBy 0 16 ; %W TweakCursor"
261 bind $win.centerframe.view <Left> "%W PanBy -16 0 ; %W TweakCursor"
262 bind $win.centerframe.view <Right> "%W PanBy 16 0 ; %W TweakCursor"
263 bind $win.centerframe.view <Tab> "EditorToolDown none %W %x %y ; EditorToolUp %W %x %y"
264
265 bind $win.centerframe.view <Meta-KeyPress> {EditorKeyDown %W %K}
266 bind $win.centerframe.view <Meta-KeyRelease> {EditorKeyUp %W %K}
267 bind $win.centerframe.view <Shift-Meta-KeyPress> {EditorKeyDown %W %K}
268 bind $win.centerframe.view <Shift-Meta-KeyRelease> {EditorKeyUp %W %K}
269
270 pack append $win.centerframe\
271 $win.centerframe.view {top frame center fill expand}
272
273 frame $win.leftframe\
274 -borderwidth 1\
275 -relief raised\
276 -geometry 130x10
277
278 SetHelp $win.leftframe Editor.ToolPallet
279
280 frame $win.leftframe.tools\
281 -borderwidth 0\
282 -relief flat
283
284 label $win.leftframe.tools.costlabel1\
285 -relief flat\
286 -font [Font $win Small]\
287 -text {}
288 LinkWindow $win.cost1 $win.leftframe.tools.costlabel1
289 LinkWindow $win.centerframe.view.cost1 $win.leftframe.tools.costlabel1
290
291 SetHelp $win.leftframe.tools.costlabel1 Editor.ToolName
292
293 label $win.leftframe.tools.costlabel2\
294 -relief flat\
295 -font [Font $win Small]\
296 -text {}
297 LinkWindow $win.cost2 $win.leftframe.tools.costlabel2
298 LinkWindow $win.centerframe.view.cost2 $win.leftframe.tools.costlabel2
299 LinkWindow $win.centerframe.top $win
300
301 SetHelp $win.leftframe.tools.costlabel2 Editor.ToolCost
302
303 canvas $win.leftframe.tools.spacer\
304 -width 132 -height 4
305
306 button $win.leftframe.tools.palletres\
307 -bitmap "@images/icres.xpm"\
308 -font [Font $win Medium] \
309 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
310 -command "EditorPallet $win 0"
311 SetHelp $win.leftframe.tools.palletres Editor.ToolRes
312
313 button $win.leftframe.tools.palletcom\
314 -bitmap "@images/iccom.xpm"\
315 -font [Font $win Medium] \
316 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
317 -command "EditorPallet $win 1"
318 SetHelp $win.leftframe.tools.palletcom Editor.ToolCom
319
320 button $win.leftframe.tools.palletind\
321 -bitmap "@images/icind.xpm"\
322 -font [Font $win Medium] \
323 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
324 -command "EditorPallet $win 2"
325 SetHelp $win.leftframe.tools.palletind Editor.ToolInd
326
327 button $win.leftframe.tools.palletfire\
328 -bitmap "@images/icfire.xpm"\
329 -font [Font $win Medium] \
330 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
331 -command "EditorPallet $win 3"
332 SetHelp $win.leftframe.tools.palletfire Editor.ToolFire
333
334 button $win.leftframe.tools.palletquery\
335 -bitmap "@images/icqry.xpm"\
336 -font [Font $win Medium] \
337 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
338 -command "EditorPallet $win 4"
339 SetHelp $win.leftframe.tools.palletquery Editor.ToolQuery
340
341 button $win.leftframe.tools.palletpolice\
342 -bitmap "@images/icpol.xpm"\
343 -font [Font $win Medium] \
344 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
345 -command "EditorPallet $win 5"
346 SetHelp $win.leftframe.tools.palletpolice Editor.ToolPolice
347
348 button $win.leftframe.tools.palletwire\
349 -bitmap "@images/icwire.xpm"\
350 -font [Font $win Medium] \
351 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
352 -command "EditorPallet $win 6"
353 SetHelp $win.leftframe.tools.palletwire Editor.ToolWire
354
355 button $win.leftframe.tools.palletbulldozer\
356 -bitmap "@images/icdozr.xpm"\
357 -font [Font $win Medium] \
358 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
359 -command "EditorPallet $win 7"
360 SetHelp $win.leftframe.tools.palletbulldozer Editor.ToolBulldozer
361
362 button $win.leftframe.tools.palletrail\
363 -bitmap "@images/icrail.xpm"\
364 -font [Font $win Medium] \
365 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
366 -command "EditorPallet $win 8"
367 SetHelp $win.leftframe.tools.palletrail Editor.ToolRail
368
369 button $win.leftframe.tools.palletroad\
370 -bitmap "@images/icroad.xpm"\
371 -font [Font $win Medium] \
372 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
373 -command "EditorPallet $win 9"
374 SetHelp $win.leftframe.tools.palletroad Editor.ToolRoad
375
376 button $win.leftframe.tools.palletchalk\
377 -bitmap "@images/icchlk.xpm"\
378 -font [Font $win Medium] \
379 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
380 -command "EditorPallet $win 10"
381 SetHelp $win.leftframe.tools.palletchalk Editor.ToolChalk
382
383 button $win.leftframe.tools.palleteraser\
384 -bitmap "@images/icersr.xpm"\
385 -font [Font $win Medium] \
386 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
387 -command "EditorPallet $win 11"
388 SetHelp $win.leftframe.tools.palleteraser Editor.ToolEraser
389
390 button $win.leftframe.tools.palletstadium\
391 -bitmap "@images/icstad.xpm"\
392 -font [Font $win Medium] \
393 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
394 -command "EditorPallet $win 12"
395 SetHelp $win.leftframe.tools.palletstadium Editor.ToolStadium
396
397 button $win.leftframe.tools.palletpark\
398 -bitmap "@images/icpark.xpm"\
399 -font [Font $win Medium] \
400 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
401 -command "EditorPallet $win 13"
402 SetHelp $win.leftframe.tools.palletpark Editor.ToolPark
403
404 button $win.leftframe.tools.palletseaport\
405 -bitmap "@images/icseap.xpm"\
406 -font [Font $win Medium] \
407 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
408 -command "EditorPallet $win 14"
409 SetHelp $win.leftframe.tools.palletseaport Editor.ToolSeaport
410
411 button $win.leftframe.tools.palletcoal\
412 -bitmap "@images/iccoal.xpm"\
413 -font [Font $win Medium] \
414 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
415 -command "EditorPallet $win 15"
416 SetHelp $win.leftframe.tools.palletcoal Editor.ToolCoal
417
418 button $win.leftframe.tools.palletnuclear\
419 -bitmap "@images/icnuc.xpm"\
420 -font [Font $win Medium] \
421 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
422 -command "EditorPallet $win 16"
423 SetHelp $win.leftframe.tools.palletnuclear Editor.ToolNuclear
424
425 button $win.leftframe.tools.palletairport\
426 -bitmap "@images/icairp.xpm"\
427 -font [Font $win Medium] \
428 -borderwidth 1 -relief flat -padx 0 -pady 0 -text {} -cursor hand2\
429 -command "EditorPallet $win 17"
430 SetHelp $win.leftframe.tools.palletairport Editor.ToolAirport
431
432 pack append $win.leftframe.tools\
433 $win.leftframe.tools.costlabel1 {top frame center fillx}\
434 $win.leftframe.tools.costlabel2 {top frame center fillx}\
435 $win.leftframe.tools.spacer {top frame center fillx}
436
437 place $win.leftframe.tools.palletres -x 9 -y 58
438 place $win.leftframe.tools.palletcom -x 47 -y 58
439 place $win.leftframe.tools.palletind -x 85 -y 58
440 place $win.leftframe.tools.palletfire -x 9 -y 112
441 place $win.leftframe.tools.palletquery -x 47 -y 112
442 place $win.leftframe.tools.palletpolice -x 85 -y 112
443 place $win.leftframe.tools.palletwire -x 28 -y 150
444 place $win.leftframe.tools.palletbulldozer -x 66 -y 150
445 place $win.leftframe.tools.palletrail -x 6 -y 188
446 place $win.leftframe.tools.palletroad -x 66 -y 188
447 place $win.leftframe.tools.palletchalk -x 28 -y 216
448 place $win.leftframe.tools.palleteraser -x 66 -y 216
449 place $win.leftframe.tools.palletstadium -x 1 -y 254
450 place $win.leftframe.tools.palletpark -x 47 -y 254
451 place $win.leftframe.tools.palletseaport -x 85 -y 254
452 place $win.leftframe.tools.palletcoal -x 1 -y 300
453 place $win.leftframe.tools.palletnuclear -x 85 -y 300
454 place $win.leftframe.tools.palletairport -x 35 -y 346
455
456 pack append $win.leftframe\
457 $win.leftframe.tools {top frame center expand fill}
458
459 pack append $win\
460 $win.topframe {top frame center fillx} \
461 $win.centerframe {right frame center expand fill} \
462 $win.leftframe {left frame center filly}
463
464 global ShapePies
465
466 piemenu $win.toolpie\
467 -title Tool\
468 -titlefont [Font $win Medium]\
469 -font [Font $win Medium]\
470 -fixedradius 26\
471 -shaped $ShapePies\
472 -preview "UIMakeSoundOn $head fancy Woosh {-volume 40}"
473 $win.toolpie add command\
474 -label Road -bitmap "@images/icroadhi.xpm"\
475 -xoffset -4\
476 -command "EditorSetTool $win 9"
477 $win.toolpie add command\
478 -label Bulldozer -bitmap "@images/icdozrhi.xpm"\
479 -xoffset 5 -yoffset 17\
480 -command "EditorSetTool $win 7"
481 $win.toolpie add piemenu\
482 -font [Font $win Medium]\
483 -label Zone -piemenu $win.zonepie
484 $win.toolpie add command\
485 -label Wire -bitmap "@images/icwirehi.xpm"\
486 -xoffset -4 -yoffset 17\
487 -command "EditorSetTool $win 6"
488 $win.toolpie add command\
489 -label Rail -bitmap "@images/icrailhi.xpm"\
490 -xoffset 4\
491 -command "EditorSetTool $win 8"
492 $win.toolpie add command\
493 -label Chalk -bitmap "@images/icchlkhi.xpm"\
494 -xoffset -4 -yoffset -17\
495 -command "EditorSetTool $win 10"
496 $win.toolpie add piemenu\
497 -font [Font $win Medium]\
498 -label Build -piemenu $win.buildpie
499 $win.toolpie add command\
500 -label Eraser -bitmap "@images/icersrhi.xpm"\
501 -xoffset 4 -yoffset -17\
502 -command "EditorSetTool $win 11"
503
504 piemenu $win.zonepie\
505 -title Zone\
506 -titlefont [Font $win Medium]\
507 -font [Font $win Medium]\
508 -shaped $ShapePies\
509 -initialangle 270 -fixedradius 20
510 $win.zonepie add command\
511 -label Query -bitmap "@images/icqryhi.xpm"\
512 -yoffset 5\
513 -command "EditorSetTool $win 4"
514 $win.zonepie add command\
515 -label Police -bitmap "@images/icpolhi.xpm"\
516 -xoffset 4 -yoffset -10\
517 -command "EditorSetTool $win 5"
518 $win.zonepie add command\
519 -label Ind -bitmap "@images/icindhi.xpm"\
520 -xoffset 4 -yoffset 25\
521 -command "EditorSetTool $win 2"
522 $win.zonepie add command\
523 -label Com -bitmap "@images/iccomhi.xpm"\
524 -yoffset -5\
525 -command "EditorSetTool $win 1"
526 $win.zonepie add command\
527 -label Res -bitmap "@images/icreshi.xpm"\
528 -xoffset -4 -yoffset 25\
529 -command "EditorSetTool $win 0"
530 $win.zonepie add command\
531 -label Fire -bitmap "@images/icfirehi.xpm"\
532 -xoffset -4 -yoffset -10\
533 -command "EditorSetTool $win 3"
534
535 piemenu $win.buildpie\
536 -title Build\
537 -titlefont [Font $win Medium]\
538 -font [Font $win Medium]\
539 -shaped $ShapePies\
540 -initialangle 270 -fixedradius 25
541 $win.buildpie add command\
542 -label Airport -bitmap "@images/icairphi.xpm"\
543 -yoffset 7\
544 -command "EditorSetTool $win 17"
545 $win.buildpie add command\
546 -label Nuclear -bitmap "@images/icnuchi.xpm"\
547 -xoffset 11 -yoffset -10\
548 -command "EditorSetTool $win 16"
549 $win.buildpie add command\
550 -label Seaport -bitmap "@images/icseaphi.xpm"\
551 -xoffset 0 -yoffset 14\
552 -command "EditorSetTool $win 14"
553 $win.buildpie add command\
554 -label Park -bitmap "@images/icparkhi.xpm"\
555 -yoffset -5\
556 -command "EditorSetTool $win 13"
557 $win.buildpie add command\
558 -label Stadium -bitmap "@images/icstadhi.xpm"\
559 -xoffset 0 -yoffset 14\
560 -command "EditorSetTool $win 12"
561 $win.buildpie add command\
562 -label Coal -bitmap "@images/iccoalhi.xpm"\
563 -xoffset -11 -yoffset -10\
564 -command "EditorSetTool $win 15"
565
566 SetEditorAutoGoto $win 0
567 SetEditorControls $win 1
568 SetEditorOverlay $win 1
569 SetEditorDynamicFilter $win 0
570
571 InitEditor $win
572
573 global CityName
574 UISetCityName $CityName
575
576 update idletasks
Impressum, Datenschutz