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