blob: 908734526fa580a5118b6bfae0e24224e534d353 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Shoes.app :height => 150, :width => 250 do
background rgb(240, 250, 208)
stack :margin => 10 do
button "Start" do
@time = Time.now
@label.replace "Stop watch started at #@time"
end
button "Stop" do
@label.replace "Stopped, ", strong("#{Time.now - @time}"), " seconds elapsed."
end
@label = para "Press ", strong("start"), " to begin timing."
end
end
|