Sha256: e942352502a3d267abb83750196231c8021f3ea4ef35ddbd56b831336c262924
Contents?: true
Size: 452 Bytes
Versions: 12
Compression:
Stored size: 452 Bytes
Contents
require '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
12 entries across 12 versions & 1 rubygems