version 1.3, 2005/08/29 14:22:27
|
version 1.4, 2005/08/29 18:14:50
|
Line 62 proc readbuffer {} {
|
Line 62 proc readbuffer {} {
|
# Setup |
# Setup |
############################################################## |
############################################################## |
|
|
button .start -text "Start" -command start |
|
pack .start |
|
label .pressed |
# Main menu |
pack .pressed |
|
|
menu .mbar -type menubar -relief ridge -borderwidth 2 |
|
pack .mbar -fill x |
|
|
|
menubutton .mbar.file -text File -menu .mbar.file.m -underline 0 \ |
|
-relief raised -borderwidth 2 |
|
pack .mbar.file -side left |
|
set m [menu .mbar.file.m] |
|
$m add command -label "Open" -state disabled |
|
$m add command -label "Save as..." -state disabled |
|
$m add command -label "Save" -state disabled |
|
$m add separator |
|
$m add command -label "Quit" -command exit |
|
|
|
menubutton .mbar.edit -text Edit -underline 0 -state disabled\ |
|
-relief raised -borderwidth 2 |
|
pack .mbar.edit -side left |
|
|
|
menubutton .mbar.help -text Help -menu .mbar.help.m -underline 0\ |
|
-relief raised -borderwidth 2 |
|
pack .mbar.help -side right |
|
set m [menu .mbar.help.m] |
|
$m add command -label "About..." -command { |
|
tk_dialog .about "About Puks" \ |
|
"Система управления кнопками. |
|
(C) Teytelman, 2002 (MCR code) |
|
(C) Boris Veytsman, 2005 (Tcl/Tk version)"\ |
|
info 0 "OK"} |
|
|
|
|
|
#Teams |
|
frame .teams |
|
pack .teams -side top |
|
for {set i 0} {$i < 8} {incr i} { |
|
frame .teams.frame($i) |
|
pack .teams.frame($i) -side top -fill x |
|
label .teams.frame($i).button -text 0 |
|
pack .teams.frame($i).button -side left |
|
entry .teams.frame($i).name -width 60 -textvariable name($i) |
|
pack .teams.frame($i).name -side left |
|
entry .teams.frame($i).score -width 6 -textvariable score($i) |
|
pack .teams.frame($i).score -side left |
|
} |
|
|
|
# button .start -text "Start" -command start |
|
# pack .start |
|
# label .pressed |
|
# pack .pressed |
|
|
|
|
proc start {} { |
proc start {} { |
Line 92 proc body {} {
|
Line 139 proc body {} {
|
after 10 body |
after 10 body |
} |
} |
|
|
body |
#body |
|
|
|
|
|
|