Sha256: 01b62b934649aaadf0367ffd5f7c37a37be4e7bcb8abf321f87b2a64791d3e29
Contents?: true
Size: 447 Bytes
Versions: 6
Compression:
Stored size: 447 Bytes
Contents
require 'purple_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} end motion{|left, top| @box.move(left-10, top-10) if @flag} end
Version data entries
6 entries across 6 versions & 1 rubygems