]> cvs.zerfleddert.de Git - micropolis/blame_incremental - res/weval.tcl
fix dependencies for simulator binary
[micropolis] / res / weval.tcl
... / ...
CommitLineData
1# Window: Player evaluation, 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 EvaluationWindows
62set n [Unique]
63set parent [WindowLink $head.col2]
64set win $parent.evaluation$n
65set EvaluationWindows [linsert $EvaluationWindows 0 $win]
66
67LinkWindow $head.evaluation $win
68LinkWindow $win.head $head
69LinkWindow $win.parent $parent
70LinkWindow $win.top $win
71
72catch "destroy $win"
73frame $win
74
75SetHelp $win Evaluation
76
77global [set var $win.visible]
78set $var 0
79
80bind $win <Visibility> {EvaluationVisible %W [string compare %s FullyObscured]}
81bind $win <Map> {EvaluationVisible %W 1}
82bind $win <Unmap> {EvaluationVisible %W 0}
83
84#wm title $win {Micropolis Evaluation}
85#wm iconname $win {Micropolis Evaluation}
86#wm group $win $head
87#wm geometry $win 480x240+5-5
88#wm withdraw $win
89#wm maxsize $win 700 700
90#wm minsize $win 400 200
91#wm protocol $win delete "DeleteWindow evaluation EvaluationWindows"
92
93
94frame $win.leftframe\
95 -borderwidth 1\
96 -relief raised
97
98SetHelp $win.leftframe Evaluation.Opinion
99
100label $win.leftframe.title\
101 -font [Font $win Big]\
102 -padx 0\
103 -relief flat\
104 -text {Public Opinion}\
105 -width 5
106
107label $win.leftframe.isthe\
108 -font [Font $win Large]\
109 -text {Is the mayor doing a good job?}
110
111SetHelp $win.leftframe.isthe Evaluation.GoodJob
112
113frame $win.leftframe.goodjobframe\
114 -borderwidth 1
115
116SetHelp $win.leftframe.goodjobframe Evaluation.GoodJob
117
118message $win.leftframe.goodjobframe.yesno\
119 -aspect 1500\
120 -justify right\
121 -padx 5\
122 -pady 2\
123 -font [Font $win Medium]\
124 -text {YES
125NO}
126
127message $win.leftframe.goodjobframe.percents\
128 -aspect 1500\
129 -justify left\
130 -padx 5\
131 -pady 2\
132 -font [Font $win Medium]\
133 -text {100%
1340%}
135LinkWindow $win.goodjob $win.leftframe.goodjobframe.percents
136
137pack append $win.leftframe.goodjobframe\
138 $win.leftframe.goodjobframe.percents {right frame w expand} \
139 $win.leftframe.goodjobframe.yesno {right frame e expand}
140
141label $win.leftframe.whatare\
142 -font [Font $win Large]\
143 -text {What are the worst problems?}
144
145SetHelp $win.leftframe.whatare Evaluation.WorstProblems
146
147frame $win.leftframe.worstproblems\
148 -borderwidth 1
149
150SetHelp $win.leftframe.worstproblems Evaluation.WorstProblems
151
152message $win.leftframe.worstproblems.problemnames\
153 -aspect 1500\
154 -justify right\
155 -padx 5\
156 -pady 2\
157 -font [Font $win Medium]\
158 -text {
159
160
161
162}
163LinkWindow $win.problemnames $win.leftframe.worstproblems.problemnames
164
165message $win.leftframe.worstproblems.problempercents\
166 -aspect 1500\
167 -justify left\
168 -padx 5\
169 -pady 2\
170 -font [Font $win Medium]\
171 -text {
172
173
174
175}
176LinkWindow $win.problempercents $win.leftframe.worstproblems.problempercents
177
178pack append $win.leftframe.worstproblems\
179 $win.leftframe.worstproblems.problempercents {right frame w expand} \
180 $win.leftframe.worstproblems.problemnames {right frame e expand}
181
182pack append $win.leftframe\
183 $win.leftframe.title {top frame center fillx expand} \
184 $win.leftframe.isthe {top frame center fillx expand} \
185 $win.leftframe.goodjobframe {top frame center fillx expand} \
186 $win.leftframe.whatare {top frame center fillx expand} \
187 $win.leftframe.worstproblems {top frame center fillx expand}
188
189frame $win.rightframe\
190 -borderwidth 1\
191 -relief raised
192
193SetHelp $win.rightframe Evaluation.Statistics
194
195label $win.rightframe.title\
196 -font [Font $win Big]\
197 -padx 0\
198 -relief flat\
199 -text {Statistics}\
200 -width 5
201
202frame $win.rightframe.statsframe\
203 -borderwidth 1
204
205message $win.rightframe.statsframe.statlabels\
206 -aspect 1500\
207 -justify right\
208 -padx 5\
209 -pady 2\
210 -font [Font $win Medium]\
211 -text {Population:
212Net Migration:
213(last year)
214Assessed Value:
215Category:
216Game Level:}
217
218message $win.rightframe.statsframe.stats\
219 -aspect 1500\
220 -justify left\
221 -padx 5\
222 -pady 2\
223 -font [Font $win Medium]\
224 -text {
225
226
227
228
229}
230LinkWindow $win.stats $win.rightframe.statsframe.stats
231
232pack append $win.rightframe.statsframe\
233 $win.rightframe.statsframe.statlabels {left frame e expand} \
234 $win.rightframe.statsframe.stats {right frame w expand}
235
236message $win.rightframe.cityscore\
237 -aspect 1500\
238 -justify center\
239 -padx 5\
240 -pady 2\
241 -font [Font $win Medium]\
242 -text {Overall City Score
243(0 - 1000)}
244
245SetHelp $win.rightframe.cityscore Evaluation.Score
246
247frame $win.rightframe.scoreframe\
248 -borderwidth 1
249
250SetHelp $win.rightframe.scoreframe Evaluation.Score
251
252message $win.rightframe.scoreframe.scorelabels\
253 -aspect 1500\
254 -justify right\
255 -padx 5\
256 -pady 2\
257 -font [Font $win Medium]\
258 -text {Current Score:
259Annual Change:}
260
261message $win.rightframe.scoreframe.scores\
262 -aspect 1500\
263 -justify left\
264 -padx 5\
265 -pady 2\
266 -font [Font $win Medium]\
267 -text {
268
269}
270LinkWindow $win.score $win.rightframe.scoreframe.scores
271
272pack append $win.rightframe.scoreframe\
273 $win.rightframe.scoreframe.scorelabels {left frame e expand} \
274 $win.rightframe.scoreframe.scores {right frame w expand}
275
276pack append $win.rightframe\
277 $win.rightframe.title {top frame center fillx expand} \
278 $win.rightframe.statsframe {top frame center fillx expand} \
279 $win.rightframe.cityscore {top frame center fillx expand} \
280 $win.rightframe.scoreframe {top frame center fillx expand}
281
282frame $win.bottomframe\
283 -borderwidth 0
284
285SetHelp $win.bottomframe Evaluation.Dismiss
286
287button $win.bottomframe.button\
288 -font [Font $win Large]\
289 -text {Dismiss Evaluation}\
290 -command "pack unpack $win"
291
292pack append $win.bottomframe\
293 $win.bottomframe.button {top frame center expand fillx}
294
295pack append $win\
296 $win.bottomframe {bottom frame center fillx}\
297 $win.leftframe {left frame center expand fill} \
298 $win.rightframe {right frame center expand fill}
299
300sim UpdateEvaluation
301
302update idletasks
Impressum, Datenschutz