]> git.zerfleddert.de Git - micropolis/blame - res/weditor.tcl
fix remaining NumLock problems by teaching tk to detect the Alt modifier
[micropolis] / res / weditor.tcl
CommitLineData
6a5fa4e0
MG
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.
61global EditorWindows
62set n [Unique]
63set parent [WindowLink $head.col2]
64set win $parent.editor$n
65set EditorWindows [linsert $EditorWindows 0 $win]
66
67global Skip.$win
68set Skip.$win 0
69global AutoGoto.$win
70set AutoGoto.$win 0
71global Controls.$win
72set Controls.$win 1
73global Overlay.$win
74set Overlay.$win 0
75global DynamicFilter.$win
76set DynamicFilter.$win 0
77
78LinkWindow $head.editor $win
79LinkWindow $win.head $head
80LinkWindow $win.parent $parent
81LinkWindow $win.top $win
82
83catch "destroy $win"
84frame $win
85
86SetHelp $win Editor
87
88bind $win <Visibility> {[WindowLink %W.view] Visible [string compare %s FullyObscured]}
89bind $win <Map> {[WindowLink %W.view] Visible 1}
90bind $win <Unmap> {[WindowLink %W.view] Visible 0}
91# $head.editor points to most recently created or entered editor
92bind $win <Enter> "LinkWindow $head.editor $win"
93
94global 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
106frame $win.topframe\
107 -borderwidth 0
108
109frame $win.topframe.controls\
110 -borderwidth 1\
111 -relief raised
112
113if {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}
a0e770d2 123 bind $win.topframe.controls.update <Alt-Key> {tk_traverseToMenu %W %A}
6a5fa4e0
MG
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}
a0e770d2 132 bind $win.topframe.controls.update.m <Alt-Key> {tk_traverseToMenu %W %A}
6a5fa4e0
MG
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
160menubutton $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
167tk_bindForTraversal $win.topframe.controls.options
168bind $win.topframe.controls.options <F10> {tk_firstMenu %W}
a0e770d2 169bind $win.topframe.controls.options <Alt-Key> {tk_traverseToMenu %W %A}
6a5fa4e0
MG
170tk_menus $win $win.topframe.controls.options
171
172SetHelp $win.topframe.controls.options Editor.Options
173
174menu $win.topframe.controls.options.m\
175 -font [Font $win Medium]
176tk_bindForTraversal $win.topframe.controls.options.m
177bind $win.topframe.controls.options.m <F10> {tk_firstMenu %W}
a0e770d2 178bind $win.topframe.controls.options.m <Alt-Key> {tk_traverseToMenu %W %A}
6a5fa4e0
MG
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
197pack append $win.topframe.controls\
198 $win.topframe.controls.options {left frame ne}
199
200# $win.topframe.controls.update {left frame ne}
201
202label $win.topframe.messagelabel\
203 -borderwidth 1\
204 -relief raised\
205 -font [Font $win Large]\
206 -text {}\
207 -width 23
208LinkWindow $win.message $win.topframe.messagelabel
209
210SetHelp $win.message Editor.Message
211
212pack append $win.topframe\
213 $win.topframe.controls {left frame ne} \
214 $win.topframe.messagelabel {left frame ne expand fill}
215
216frame $win.centerframe\
217 -cursor hand2\
218 -borderwidth 1\
219 -relief sunken
220
221SetHelp $win.centerframe Editor.View
222
223editorview $win.centerframe.view\
224 -font [Font $win Big]
225LinkWindow $win.view $win.centerframe.view
226LinkWindow $win.centerframe.view.top $win
227
228BindEditorButtons $win.centerframe.view
229
230bind $win.centerframe.view <Any-Enter> {focus %W}
231
232if {[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
259bind $win.centerframe.view <Up> "%W PanBy 0 -16 ; %W TweakCursor"
260bind $win.centerframe.view <Down> "%W PanBy 0 16 ; %W TweakCursor"
261bind $win.centerframe.view <Left> "%W PanBy -16 0 ; %W TweakCursor"
262bind $win.centerframe.view <Right> "%W PanBy 16 0 ; %W TweakCursor"
263bind $win.centerframe.view <Tab> "EditorToolDown none %W %x %y ; EditorToolUp %W %x %y"
264
265bind $win.centerframe.view <Meta-KeyPress> {EditorKeyDown %W %K}
266bind $win.centerframe.view <Meta-KeyRelease> {EditorKeyUp %W %K}
267bind $win.centerframe.view <Shift-Meta-KeyPress> {EditorKeyDown %W %K}
268bind $win.centerframe.view <Shift-Meta-KeyRelease> {EditorKeyUp %W %K}
269
270pack append $win.centerframe\
271 $win.centerframe.view {top frame center fill expand}
272
273frame $win.leftframe\
274 -borderwidth 1\
275 -relief raised\
276 -geometry 130x10
277
278SetHelp $win.leftframe Editor.ToolPallet
279
280frame $win.leftframe.tools\
281 -borderwidth 0\
282 -relief flat
283
284label $win.leftframe.tools.costlabel1\
285 -relief flat\
286 -font [Font $win Small]\
287 -text {}
288LinkWindow $win.cost1 $win.leftframe.tools.costlabel1
289LinkWindow $win.centerframe.view.cost1 $win.leftframe.tools.costlabel1
290
291SetHelp $win.leftframe.tools.costlabel1 Editor.ToolName
292
293label $win.leftframe.tools.costlabel2\
294 -relief flat\
295 -font [Font $win Small]\
296 -text {}
297LinkWindow $win.cost2 $win.leftframe.tools.costlabel2
298LinkWindow $win.centerframe.view.cost2 $win.leftframe.tools.costlabel2
299LinkWindow $win.centerframe.top $win
300
301SetHelp $win.leftframe.tools.costlabel2 Editor.ToolCost
302
303canvas $win.leftframe.tools.spacer\
304 -width 132 -height 4
305
306button $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"
311SetHelp $win.leftframe.tools.palletres Editor.ToolRes
312
313button $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"
318SetHelp $win.leftframe.tools.palletcom Editor.ToolCom
319
320button $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"
325SetHelp $win.leftframe.tools.palletind Editor.ToolInd
326
327button $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"
332SetHelp $win.leftframe.tools.palletfire Editor.ToolFire
333
334button $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"
339SetHelp $win.leftframe.tools.palletquery Editor.ToolQuery
340
341button $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"
346SetHelp $win.leftframe.tools.palletpolice Editor.ToolPolice
347
348button $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"
353SetHelp $win.leftframe.tools.palletwire Editor.ToolWire
354
355button $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"
360SetHelp $win.leftframe.tools.palletbulldozer Editor.ToolBulldozer
361
362button $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"
367SetHelp $win.leftframe.tools.palletrail Editor.ToolRail
368
369button $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"
374SetHelp $win.leftframe.tools.palletroad Editor.ToolRoad
375
376button $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"
381SetHelp $win.leftframe.tools.palletchalk Editor.ToolChalk
382
383button $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"
388SetHelp $win.leftframe.tools.palleteraser Editor.ToolEraser
389
390button $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"
395SetHelp $win.leftframe.tools.palletstadium Editor.ToolStadium
396
397button $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"
402SetHelp $win.leftframe.tools.palletpark Editor.ToolPark
403
404button $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"
409SetHelp $win.leftframe.tools.palletseaport Editor.ToolSeaport
410
411button $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"
416SetHelp $win.leftframe.tools.palletcoal Editor.ToolCoal
417
418button $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"
423SetHelp $win.leftframe.tools.palletnuclear Editor.ToolNuclear
424
425button $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"
430SetHelp $win.leftframe.tools.palletairport Editor.ToolAirport
431
432pack 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
437place $win.leftframe.tools.palletres -x 9 -y 58
438place $win.leftframe.tools.palletcom -x 47 -y 58
439place $win.leftframe.tools.palletind -x 85 -y 58
440place $win.leftframe.tools.palletfire -x 9 -y 112
441place $win.leftframe.tools.palletquery -x 47 -y 112
442place $win.leftframe.tools.palletpolice -x 85 -y 112
443place $win.leftframe.tools.palletwire -x 28 -y 150
444place $win.leftframe.tools.palletbulldozer -x 66 -y 150
445place $win.leftframe.tools.palletrail -x 6 -y 188
446place $win.leftframe.tools.palletroad -x 66 -y 188
447place $win.leftframe.tools.palletchalk -x 28 -y 216
448place $win.leftframe.tools.palleteraser -x 66 -y 216
449place $win.leftframe.tools.palletstadium -x 1 -y 254
450place $win.leftframe.tools.palletpark -x 47 -y 254
451place $win.leftframe.tools.palletseaport -x 85 -y 254
452place $win.leftframe.tools.palletcoal -x 1 -y 300
453place $win.leftframe.tools.palletnuclear -x 85 -y 300
454place $win.leftframe.tools.palletairport -x 35 -y 346
455
456pack append $win.leftframe\
457 $win.leftframe.tools {top frame center expand fill}
458
459pack 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
464global ShapePies
465
466piemenu $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
504piemenu $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
535piemenu $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
566SetEditorAutoGoto $win 0
567SetEditorControls $win 1
568SetEditorOverlay $win 1
569SetEditorDynamicFilter $win 0
570
571InitEditor $win
572
573global CityName
574UISetCityName $CityName
575
576update idletasks
Impressum, Datenschutz