]> git.zerfleddert.de Git - micropolis/blame_incremental - res/wscen_older.tcl
src/tk/tkevent.c: Micropolis build fixes for recent macOS
[micropolis] / res / wscen_older.tcl
... / ...
CommitLineData
1# Window: Scenarios, 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#
62global ScenarioWindows
63set n [Unique]
64set parent [WindowLink $head.col2]
65set win $parent.scenario$n
66set ScenarioWindows [linsert $ScenarioWindows 0 $win]
67
68global ScenarioPanelWidth
69global ScenarioPanelHeight
70
71LinkWindow $head.scenario $win
72LinkWindow $win.head $head
73LinkWindow $win.parent $parent
74
75catch "destroy $win"
76frame $win \
77 -width $ScenarioPanelWidth \
78 -height $ScenarioPanelHeight
79
80SetHelp $win Scenario
81
82frame $win.scen\
83 -borderwidth 0 -geometry 100x280
84
85label $win.scen.micropolis\
86 -bitmap "@images/micropolisl.xpm" \
87 -font [Font $win Medium]
88
89button $win.scen.newcity\
90 -command "UIGenerateNewCity" \
91 -relief flat \
92 -borderwidth 0 \
93 -bitmap "@images/scncty.xpm" \
94 -font [Font $win Medium]
95
96SetHelp $win.scen.newcity Scenario.NewCity
97
98button $win.scen.loadcity\
99 -command "UILoadCity $head" \
100 -relief flat \
101 -borderwidth 0 \
102 -bitmap "@images/sclcty.xpm" \
103 -font [Font $win Medium]
104
105SetHelp $win.scen.loadcity Scenario.LoadCity
106
107button $win.scen.dullsville\
108 -command {UILoadScenario 1} \
109 -relief flat \
110 -borderwidth 0 \
111 -bitmap "@images/scdull.xpm" \
112 -font [Font $win Medium]
113
114SetHelp $win.scen.dullsville Scenario.Dullsville
115
116button $win.scen.sanfrancisco\
117 -command {UILoadScenario 2} \
118 -relief flat \
119 -borderwidth 0 \
120 -bitmap "@images/scsfo.xpm" \
121 -font [Font $win Medium]
122
123SetHelp $win.scen.sanfrancisco Scenario.SanFran
124
125button $win.scen.hamburg\
126 -command {UILoadScenario 3} \
127 -relief flat \
128 -borderwidth 0 \
129 -bitmap "@images/scham.xpm" \
130 -font [Font $win Medium]
131
132SetHelp $win.scen.hamburg Scenario.Hamburg
133
134button $win.scen.bern\
135 -command {UILoadScenario 4} \
136 -relief flat \
137 -borderwidth 0 \
138 -bitmap "@images/scbern.xpm" \
139 -font [Font $win Medium]
140
141SetHelp $win.scen.bern Scenario.Bern
142
143button $win.scen.tokyo\
144 -command {UILoadScenario 5} \
145 -relief flat \
146 -borderwidth 0 \
147 -bitmap "@images/sctkyo.xpm" \
148 -font [Font $win Medium]
149
150SetHelp $win.scen.tokyo Scenario.Tokyo
151
152button $win.scen.rio\
153 -command {UILoadScenario 8} \
154 -relief flat \
155 -borderwidth 0 \
156 -bitmap "@images/scrio.xpm" \
157 -font [Font $win Medium]
158
159SetHelp $win.scen.rio Scenario.Rio
160
161button $win.scen.boston\
162 -command {UILoadScenario 7} \
163 -relief flat \
164 -borderwidth 0 \
165 -bitmap "@images/scbos.xpm" \
166 -font [Font $win Medium]
167
168SetHelp $win.scen.boston Scenario.Boston
169
170button $win.scen.detroit\
171 -command {UILoadScenario 6} \
172 -relief flat \
173 -borderwidth 0 \
174 -bitmap "@images/scdet.xpm" \
175 -font [Font $win Medium]
176
177SetHelp $win.scen.detroit Scenario.Detroit
178
179message $win.scen.labeldullville\
180 -aspect 1500\
181 -font [Font $win Small] \
182 -justify center \
183 -text {Dullsville 1900
184Boredom}
185
186SetHelp $win.scen.labeldullville Scenario.Dullsville
187
188message $win.scen.labelsanfrancisco\
189 -aspect 1500\
190 -font [Font $win Small] \
191 -justify center \
192 -text {San Francisco 1906
193Earthquake}
194
195SetHelp $win.scen.labelsanfrancisco Scenario.SanFran
196
197message $win.scen.labelhamburg\
198 -aspect 1500\
199 -font [Font $win Small] \
200 -justify center \
201 -text {Hamburg 1944
202Bombing}
203
204SetHelp $win.scen.labelhamburg Scenario.Hamburg
205
206message $win.scen.labelbern\
207 -aspect 1500\
208 -font [Font $win Small] \
209 -justify center \
210 -text {Bern 1965
211Traffic}
212
213SetHelp $win.scen.labelbern Scenario.Bern
214
215message $win.scen.labeltokyo\
216 -aspect 1500\
217 -font [Font $win Small] \
218 -justify center \
219 -text {Tokyo 1957
220Monster Attack}
221
222SetHelp $win.scen.labeltokyo Scenario.Tokyo
223
224message $win.scen.labelrio\
225 -aspect 1500\
226 -font [Font $win Small] \
227 -justify center \
228 -text {Rio de Janeiro 2047
229Coastal Flooding}
230
231SetHelp $win.scen.labelrio Scenario.Rio
232
233message $win.scen.labelboston\
234 -aspect 1500\
235 -font [Font $win Small] \
236 -justify center \
237 -text {Boston 2010
238Nuclear Meltdown}
239
240SetHelp $win.scen.labelboston Scenario.Boston
241
242message $win.scen.labeldetroit\
243 -aspect 1500\
244 -font [Font $win Small] \
245 -justify center \
246 -text {Detroit 1972
247Crime}
248
249SetHelp $win.scen.labeldetroit Scenario.Detroit
250
2514lace $win.scen.micropolis -anchor n -x 205 -y 25
252place $win.scen.newcity -x 20 -y 10
253place $win.scen.loadcity -x 320 -y 10
254place $win.scen.dullsville -x 20 -y 80
255place $win.scen.sanfrancisco -x 120 -y 80
256place $win.scen.hamburg -x 220 -y 80
257place $win.scen.bern -x 320 -y 80
258place $win.scen.tokyo -x 20 -y 180
259place $win.scen.rio -x 120 -y 180
260place $win.scen.boston -x 220 -y 180
261place $win.scen.detroit -x 320 -y 180
262place $win.scen.labeldullville -anchor n -x 54 -y 140
263place $win.scen.labelsanfrancisco -anchor n -x 154 -y 140
264place $win.scen.labelhamburg -anchor n -x 254 -y 140
265place $win.scen.labelbern -anchor n -x 354 -y 140
266place $win.scen.labeltokyo -anchor n -x 54 -y 240
267place $win.scen.labelrio -anchor n -x 154 -y 240
268place $win.scen.labelboston -anchor n -x 254 -y 240
269place $win.scen.labeldetroit -anchor n -x 354 -y 240
270
271BindSimButton $win.scen.newcity
272BindSimButton $win.scen.loadcity
273BindSimButton $win.scen.dullsville
274BindSimButton $win.scen.sanfrancisco
275BindSimButton $win.scen.hamburg
276BindSimButton $win.scen.bern
277BindSimButton $win.scen.tokyo
278BindSimButton $win.scen.rio
279BindSimButton $win.scen.boston
280BindSimButton $win.scen.detroit
281
282frame $win.name \
283 -borderwidth 2\
284 -relief flat
285
286SetHelp $win.name Scenario.Name
287
288label $win.name.namelabel \
289 -text {City Name:} \
290 -font [Font $win Text]
291
292entry $win.name.cityname \
293 -text {}\
294 -textvariable CityName \
295 -font [Font $win Text] \
296 -width 50
297bind $win.name.cityname <Return> "DoEnterCityName $win"
298bind $win.name.cityname <Any-Enter> {focus %W}
299LinkWindow $win.cityname $win.name.cityname
300
301pack append $win.name \
302 $win.name.namelabel {left frame e}\
303 $win.name.cityname {left frame e}
304
305frame $win.level \
306 -borderwidth 2\
307 -relief flat
308
309SetHelp $win.level Scenario.Level
310
311label $win.level.levellabel \
312 -text {Game Level:} \
313 -font [Font $win Text]
314
315frame $win.level.radio \
316 -borderwidth 0\
317 -relief flat
318
319radiobutton $win.level.radio.easy \
320 -text "Easy" -variable GameLevel -value 0 \
321 -command "DoSetGameLevel 0" \
322 -font [Font $win Large]
323
324radiobutton $win.level.radio.medium \
325 -text "Medium" -variable GameLevel -value 1 \
326 -command "DoSetGameLevel 1" \
327 -font [Font $win Large]
328
329radiobutton $win.level.radio.hard \
330 -text "Hard" -variable GameLevel -value 2 \
331 -command "DoSetGameLevel 2" \
332 -font [Font $win Large]
333
334pack append $win.level.radio \
335 $win.level.radio.easy {top frame e expand fillx}\
336 $win.level.radio.medium {top frame e expand fillx}\
337 $win.level.radio.hard {top frame e expand fillx}
338
339frame $win.level.label \
340 -borderwidth 0\
341 -relief flat
342
343label $win.level.label.easylabel \
344 -text {Initial Funds: $20,000} \
345 -font [Font $win Large] \
346 -anchor w
347
348label $win.level.label.mediumlabel \
349 -text {Initial Funds: $10,000} \
350 -font [Font $win Large] \
351 -anchor w
352
353label $win.level.label.hardlabel \
354 -text {Initial Funds: $5,000} \
355 -font [Font $win Large] \
356 -anchor w
357
358pack append $win.level.label \
359 $win.level.label.easylabel {top frame e expand fillx} \
360 $win.level.label.mediumlabel {top frame e expand fillx} \
361 $win.level.label.hardlabel {top frame e expand fillx}
362
363pack append $win.level \
364 $win.level.levellabel {left frame ne} \
365 $win.level.radio {left frame ne} \
366 $win.level.label {left frame ne expand fillx}
367
368frame $win.buttons \
369 -borderwidth 0\
370 -relief flat -borderwidth 2
371
372button $win.buttons.previous \
373 -text {Previous Map}\
374 -font [Font $win Large]\
375 -command "PrevHistory"\
376 -relief raised \
377 -width 20
378LinkWindow $win.previous $win.buttons.previous
379
380SetHelp $win.buttons.previous Scenario.Previous
381
382frame $win.buttons.voteframe \
383 -borderwidth 0 \
384 -relief raised
385LinkWindow $win.voteframe $win.buttons.voteframe
386
387SetHelp $win.buttons.voteframe Scenario.Use
388
389button $win.buttons.voteframe.vote \
390 -font [Font $win Large]\
391 -text { Use This Map }\
392 -command "DoVote $win UseThisMap UIUseThisMap {}"\
393 -relief raised \
394 -borderwidth 1\
395 -width 20
396LinkWindow $win.vote $win.buttons.voteframe.vote
397
398pack append $win.buttons.voteframe\
399 $win.buttons.voteframe.vote {top frame center}
400
401BindVotingButton $win $win.buttons.voteframe.vote UseThisMap
402
403button $win.buttons.next \
404 -font [Font $win Large]\
405 -text {Next Map}\
406 -command "NextHistory"\
407 -width 20
408LinkWindow $win.next $win.buttons.next
409
410SetHelp $win.buttons.next Scenario.Next
411
412pack append $win.buttons\
413 $win.buttons.previous {left frame nw}\
414 $win.buttons.voteframe {left frame nw}\
415 $win.buttons.next {left frame nw}
416
417pack append $win\
418 $win.scen {top frame center fillx}\
419 $win.buttons {top frame center fillx}\
420 $win.name {top frame center fillx}\
421 $win.level {top frame center fillx}\
422
423#place configure $win -x 0 -y 0 -width $ScenarioPanelWidth -height $ScenarioPanelHeight
424
425InitScenario $win
426
427update idletasks
Impressum, Datenschutz