Sha256: 655f45c47bcffa97ae2611c1928f0f15ee801b53ed77637c43f4c652368b79a0

Contents?: true

Size: 645 Bytes

Versions: 12

Compression:

Stored size: 645 Bytes

Contents

require '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

12 entries across 12 versions & 1 rubygems

Version Path
green_shoes-1.1.374 samples/sample12.rb
green_shoes-1.1.373 samples/sample12.rb
green_shoes-1.1.367 samples/sample12.rb
green_shoes-1.1.366 samples/sample12.rb
green_shoes-1.1.365 samples/sample12.rb
green_shoes-1.1.364 samples/sample12.rb
green_shoes-1.1.363 samples/sample12.rb
green_shoes-1.1.362 samples/sample12.rb
green_shoes-1.1.358 samples/sample12.rb
green_shoes-1.1.357 samples/sample12.rb
green_shoes-1.1.354 samples/sample12.rb
green_shoes-1.1.348 samples/sample12.rb