Skip to content

Commit

Permalink
adding intro example app from original shoes announcement 'okay, well…
Browse files Browse the repository at this point in the history
…... shoes'
  • Loading branch information
Zachary Scott committed Oct 28, 2010
1 parent 55423ac commit db3aa0a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions basic/intro.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# From the original Shoes announcement: "Okay, well... Shoes"
# http://github.com/shoes/shoes/wiki/%E2%80%9COkay,-Well...-Shoes%E2%80%9D
#
# had to change "text" to "para" to match shoes 3 api
#
label, time = nil, Time.now
Shoes.app :height => 150, :width => 250 do
background "rgb(240, 250, 208)"
stack :margin => 10 do
start = button "Start" do
time = Time.now
label.replace "Stop watch started at #{time}"
end
stop = button "Stop" do
label.replace "Stopped, #{Time.now - time} seconds elapsed."
end
label = para "Press start to begin timing."
end
end

0 comments on commit db3aa0a

Please sign in to comment.