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