Sha256: 892d37a4c83cc72c5ac0ec4d85a61db1d238899ab9334f9ff12e2f1fd3b2c436

Contents?: true

Size: 652 Bytes

Versions: 23

Compression:

Stored size: 652 Bytes

Contents

require '../lib/green_shoes'

Shoes.app width: 300, height: 300 do
  background cadetblue
  r = rect 100, 10, 100, fill: red, strokewidth: 5, curve: 10, stroke: pink
  r.click{alert 'Yay!'}
  o = oval 100, 110, 100, 100, fill: green, strokewidth: 10, stroke: white
  para 'Green Shoes!!', left: 100, top: 70

  size = COLORS.keys.size
  j = 0
  a = animate 1 do |i|
    unless j == i
      r.style fill: send(COLORS.keys[rand size]), stroke: send(COLORS.keys[rand size]), noorder: true
      o.style fill: send(COLORS.keys[rand size]), stroke: send(COLORS.keys[rand size])
      j = i
    end
  end

  button('pause'){a.pause}
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
green_shoes-1.0.337 samples/sample12.rb
green_shoes-1.0.331 samples/sample12.rb
green_shoes-1.0.322 samples/sample12.rb
green_shoes-1.0.320 samples/sample12.rb
green_shoes-1.0.309 samples/sample12.rb
green_shoes-1.0.303 samples/sample12.rb
green_shoes-1.0.282 samples/sample12.rb
green_shoes-1.0.273 samples/sample12.rb
green_shoes-0.263.0 samples/sample12.rb
green_shoes-0.255.0 samples/sample12.rb
green_shoes-0.243.0 samples/sample12.rb
green_shoes-0.233.0 samples/sample12.rb
green_shoes-0.227.0 samples/sample12.rb
green_shoes-0.226.0 samples/sample12.rb
green_shoes-0.221.0 samples/sample12.rb
green_shoes-0.214.0 samples/sample12.rb
green_shoes-0.207.0 samples/sample12.rb
green_shoes-0.201.0 samples/sample12.rb
green_shoes-0.198.0 samples/sample12.rb
green_shoes-0.189.0 samples/sample12.rb