Sha256: 52c14f7bed58723259e859d9f7c25b0a6171285df4597bac40aecd537ecfa60b

Contents?: true

Size: 459 Bytes

Versions: 27

Compression:

Stored size: 459 Bytes

Contents

require '../lib/green_shoes'

# The same as sample60.rb on Shoes Tutorial Note
Shoes.app :width => 300, :height => 300 do
  i = 45
  button 'new'do
    i += 5
    box = rand(2) == 0 ? rect(i, i, 20) : oval(i, i, 10)
    box.style :fill => send(COLORS.keys[rand(COLORS.keys.size)])

    @flag = false
    box.click{@flag = true; @box = box}
    box.release{@flag = false}
    motion{|left, top| @box.move(left-10, top-10) if @flag}
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

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