-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgameSettings.tcl
409 lines (397 loc) · 18.5 KB
/
gameSettings.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
#############################################################################
# Generated by PAGE version 4.22
# in conjunction with Tcl version 8.6
# Jul 23, 2019 11:52:42 AM CEST platform: Windows NT
set vTcl(timestamp) ""
if {!$vTcl(borrow)} {
set vTcl(actual_gui_bg) #d9d9d9
set vTcl(actual_gui_fg) #000000
set vTcl(actual_gui_analog) #ececec
set vTcl(actual_gui_menu_analog) #ececec
set vTcl(actual_gui_menu_bg) #d9d9d9
set vTcl(actual_gui_menu_fg) #000000
set vTcl(complement_color) #d9d9d9
set vTcl(analog_color_p) #d9d9d9
set vTcl(analog_color_m) #ececec
set vTcl(active_fg) #000000
set vTcl(actual_gui_menu_active_bg) #ececec
set vTcl(active_menu_fg) #000000
}
#################################
#LIBRARY PROCEDURES
#
if {[info exists vTcl(sourcing)]} {
proc vTcl:project:info {} {
set base .top42
global vTcl
set base $vTcl(btop)
if {$base == ""} {
set base .top42
}
namespace eval ::widgets::$base {
set dflt,origin 0
set runvisible 1
}
namespace eval ::widgets_bindings {
set tagslist _TopLevel
}
namespace eval ::vTcl::modules::main {
set procs {
}
set compounds {
}
set projectType single
}
}
}
#################################
# GENERATED GUI PROCEDURES
#
proc vTclWindow.top42 {base} {
if {$base == ""} {
set base .top42
}
if {[winfo exists $base]} {
wm deiconify $base; return
}
set top $base
###################
# CREATING WIDGETS
###################
vTcl::widgets::core::toplevel::createCmd $top -class Toplevel \
-menu "$top.m72" -background {#d9d9d9} -highlightbackground {#d9d9d9} \
-highlightcolor black
wm focusmodel $top passive
wm geometry $top 514x491+492+213
update
# set in toplevel.wgt.
global vTcl
global img_list
set vTcl(save,dflt,origin) 0
wm maxsize $top 1684 1031
wm minsize $top 120 1
wm overrideredirect $top 0
wm resizable $top 1 1
wm deiconify $top
wm title $top "New Toplevel"
vTcl:DefineAlias "$top" "Toplevel1" vTcl:Toplevel:WidgetProc "" 1
frame $top.fra43 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 125 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 105
vTcl:DefineAlias "$top.fra43" "frameField" vTcl:WidgetProc "Toplevel1" 1
set site_3_0 $top.fra43
radiobutton $site_3_0.rad50 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Football -value football -variable varGroupField \
-width 60
vTcl:DefineAlias "$site_3_0.rad50" "Radiobutton1" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad50
radiobutton $site_3_0.rad51 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Hockey -value hockey -variable varGroupField \
-width 60
vTcl:DefineAlias "$site_3_0.rad51" "Radiobutton2" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad51
radiobutton $site_3_0.rad52 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Rugby -value rugby -variable varGroupField \
-width 60
vTcl:DefineAlias "$site_3_0.rad52" "Radiobutton3" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad52
place $site_3_0.rad50 \
-in $site_3_0 -x 20 -y 20 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad51 \
-in $site_3_0 -x 20 -y 50 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad52 \
-in $site_3_0 -x 20 -y 80 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
label $top.lab49 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 11} -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -text Field
vTcl:DefineAlias "$top.lab49" "Label1" vTcl:WidgetProc "Toplevel1" 1
frame $top.fra55 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 125 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 105
vTcl:DefineAlias "$top.fra55" "frameSize" vTcl:WidgetProc "Toplevel1" 1
set site_3_0 $top.fra55
radiobutton $site_3_0.rad50 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Small -value small -variable varGroupSize \
-width 60
vTcl:DefineAlias "$site_3_0.rad50" "Radiobutton1_3" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad50
radiobutton $site_3_0.rad51 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Medium -value medium -variable varGroupSize \
-width 60
vTcl:DefineAlias "$site_3_0.rad51" "Radiobutton2_4" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad51
radiobutton $site_3_0.rad52 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Big -value big -variable varGroupSize -width 60
vTcl:DefineAlias "$site_3_0.rad52" "Radiobutton3_5" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_3_0.rad52
place $site_3_0.rad50 \
-in $site_3_0 -x 20 -y 20 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad51 \
-in $site_3_0 -x 20 -y 50 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad52 \
-in $site_3_0 -x 20 -y 80 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
label $top.lab57 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 11} -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -text Size
vTcl:DefineAlias "$top.lab57" "Label1_6" vTcl:WidgetProc "Toplevel1" 1
frame $top.fra60 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 255 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 185
vTcl:DefineAlias "$top.fra60" "framePlayer1" vTcl:WidgetProc "Toplevel1" 1
set site_3_0 $top.fra60
frame $site_3_0.fra61 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 125 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 105
vTcl:DefineAlias "$site_3_0.fra61" "framePlayer1_AIdifficulty" vTcl:WidgetProc "Toplevel1" 1
set site_4_0 $site_3_0.fra61
radiobutton $site_4_0.rad50 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Easy -value easy -variable varGroupDifficultyAI1 \
-width 60
vTcl:DefineAlias "$site_4_0.rad50" "Radiobutton1_1" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad50
radiobutton $site_4_0.rad51 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Medium -value medium \
-variable varGroupDifficultyAI1 -width 60
vTcl:DefineAlias "$site_4_0.rad51" "Radiobutton2_2" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad51
radiobutton $site_4_0.rad52 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Hard -value hard -variable varGroupDifficultyAI1 \
-width 60
vTcl:DefineAlias "$site_4_0.rad52" "Radiobutton3_3" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad52
place $site_4_0.rad50 \
-in $site_4_0 -x 20 -y 20 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_4_0.rad51 \
-in $site_4_0 -x 20 -y 50 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_4_0.rad52 \
-in $site_4_0 -x 20 -y 80 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
radiobutton $site_3_0.rad64 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -command rdbPlayer1_OnClick \
-disabledforeground {#a3a3a3} -font TkDefaultFont \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -indicatoron 0 -justify left -text Human \
-value human -variable varGroupPlayer1
vTcl:DefineAlias "$site_3_0.rad64" "rdbPlayer1_human" vTcl:WidgetProc "Toplevel1" 1
radiobutton $site_3_0.rad65 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -command rdbPlayer1_OnClick \
-disabledforeground {#a3a3a3} -font TkDefaultFont \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -indicatoron 0 -justify left -text AI -value AI \
-variable varGroupPlayer1
vTcl:DefineAlias "$site_3_0.rad65" "rdbPlayer1_AI" vTcl:WidgetProc "Toplevel1" 1
place $site_3_0.fra61 \
-in $site_3_0 -x 40 -y 110 -width 105 -relwidth 0 -height 125 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad64 \
-in $site_3_0 -x 40 -y 40 -width 60 -relwidth 0 -height 35 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad65 \
-in $site_3_0 -x 40 -y 80 -width 60 -relwidth 0 -height 35 \
-relheight 0 -anchor nw -bordermode ignore
frame $top.fra67 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 255 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 185
vTcl:DefineAlias "$top.fra67" "framePlayer2" vTcl:WidgetProc "Toplevel1" 1
set site_3_0 $top.fra67
frame $site_3_0.fra61 \
-borderwidth 2 -relief groove -background {#d9d9d9} -height 125 \
-highlightbackground {#d9d9d9} -highlightcolor black -width 105
vTcl:DefineAlias "$site_3_0.fra61" "framePlayer2_AIdifficulty" vTcl:WidgetProc "Toplevel1" 1
set site_4_0 $site_3_0.fra61
radiobutton $site_4_0.rad50 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Easy -value easy -variable varGroupDifficultyAI2 \
-width 60
vTcl:DefineAlias "$site_4_0.rad50" "Radiobutton1_4" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad50
radiobutton $site_4_0.rad51 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Medium -value medium \
-variable varGroupDifficultyAI2 -width 60
vTcl:DefineAlias "$site_4_0.rad51" "Radiobutton2_5" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad51
radiobutton $site_4_0.rad52 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font TkDefaultFont -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -indicatoron 0 \
-justify left -text Hard -value hard -variable varGroupDifficultyAI2 \
-width 60
vTcl:DefineAlias "$site_4_0.rad52" "Radiobutton3_6" vTcl:WidgetProc "Toplevel1" 1
vTcl:copy_lock $site_4_0.rad52
place $site_4_0.rad50 \
-in $site_4_0 -x 20 -y 20 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_4_0.rad51 \
-in $site_4_0 -x 20 -y 50 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
place $site_4_0.rad52 \
-in $site_4_0 -x 20 -y 80 -width 60 -relwidth 0 -height 25 \
-relheight 0 -anchor nw -bordermode ignore
radiobutton $site_3_0.rad64 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -command rdbPlayer2_OnClick \
-disabledforeground {#a3a3a3} -font TkDefaultFont \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -indicatoron 0 -justify left -text Human \
-value human -variable varGroupPlayer2
vTcl:DefineAlias "$site_3_0.rad64" "rdbPlayer2_human" vTcl:WidgetProc "Toplevel1" 1
radiobutton $site_3_0.rad65 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -command rdbPlayer2_OnClick \
-disabledforeground {#a3a3a3} -font TkDefaultFont \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -indicatoron 0 -justify left -text AI -value AI \
-variable varGroupPlayer2
vTcl:DefineAlias "$site_3_0.rad65" "rdbPlayer2_AI" vTcl:WidgetProc "Toplevel1" 1
place $site_3_0.fra61 \
-in $site_3_0 -x 40 -y 110 -width 105 -relwidth 0 -height 125 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad64 \
-in $site_3_0 -x 40 -y 40 -width 60 -relwidth 0 -height 35 \
-relheight 0 -anchor nw -bordermode ignore
place $site_3_0.rad65 \
-in $site_3_0 -x 40 -y 80 -width 60 -relwidth 0 -height 35 \
-relheight 0 -anchor nw -bordermode ignore
label $top.lab68 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 11} -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -text {Player 1}
vTcl:DefineAlias "$top.lab68" "Label1_11" vTcl:WidgetProc "Toplevel1" 1
label $top.lab69 \
-activebackground {#f9f9f9} -activeforeground black \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 11} -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -text {Player 2}
vTcl:DefineAlias "$top.lab69" "Label1_12" vTcl:WidgetProc "Toplevel1" 1
button $top.but70 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 10 -weight bold} \
-foreground {#000000} -highlightbackground {#d9d9d9} \
-highlightcolor black -pady 0 -text Save
vTcl:DefineAlias "$top.but70" "btnSave" vTcl:WidgetProc "Toplevel1" 1
bind $top.but70 <Button-1> {
lambda e: btnSave_OnClick(e)
}
button $top.but71 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -disabledforeground {#a3a3a3} \
-font {-family {Segoe UI} -size 10} -foreground {#000000} \
-highlightbackground {#d9d9d9} -highlightcolor black -pady 0 \
-text Cancel
vTcl:DefineAlias "$top.but71" "btnCancel" vTcl:WidgetProc "Toplevel1" 1
bind $top.but71 <Button-1> {
lambda e: btnCancel_OnClick(e)
}
set site_3_0 $top.m72
menu $site_3_0 \
-activebackground {#ececec} -activeforeground {#000000} \
-background {#d9d9d9} -font TkMenuFont -foreground {#000000} \
-tearoff 0
###################
# SETTING GEOMETRY
###################
place $top.fra43 \
-in $top -x 40 -y 30 -width 105 -relwidth 0 -height 125 -relheight 0 \
-anchor nw -bordermode ignore
place $top.lab49 \
-in $top -x 50 -y 20 -width 48 -relwidth 0 -height 26 -relheight 0 \
-anchor nw -bordermode ignore
place $top.fra55 \
-in $top -x 180 -y 30 -width 105 -height 125 -anchor nw \
-bordermode ignore
place $top.lab57 \
-in $top -x 190 -y 20 -width 48 -height 26 -anchor nw \
-bordermode ignore
place $top.fra60 \
-in $top -x 40 -y 200 -width 185 -relwidth 0 -height 255 -relheight 0 \
-anchor nw -bordermode ignore
place $top.fra67 \
-in $top -x 260 -y 200 -width 185 -height 255 -anchor nw \
-bordermode ignore
place $top.lab68 \
-in $top -x 50 -y 190 -width 68 -relwidth 0 -height 26 -relheight 0 \
-anchor nw -bordermode ignore
place $top.lab69 \
-in $top -x 270 -y 190 -width 68 -height 26 -anchor nw \
-bordermode ignore
place $top.but70 \
-in $top -x 360 -y 30 -width 117 -relwidth 0 -height 44 -relheight 0 \
-anchor nw -bordermode ignore
place $top.but71 \
-in $top -x 360 -y 90 -width 117 -height 44 -anchor nw \
-bordermode ignore
vTcl:FireEvent $base <<Ready>>
}
set btop ""
if {$vTcl(borrow)} {
set btop .bor[expr int([expr rand() * 100])]
while {[lsearch $btop $vTcl(tops)] != -1} {
set btop .bor[expr int([expr rand() * 100])]
}
}
set vTcl(btop) $btop
Window show .
Window show .top42 $btop
if {$vTcl(borrow)} {
$btop configure -background plum
}