Sha256: f5f3a4877ad5c1129237fe87f050b6be1c876b49262b55988c73bb76d82d4adb

Contents?: true

Size: 375 Bytes

Versions: 2

Compression:

Stored size: 375 Bytes

Contents

Shoes.app width: 300, height: 300 do
  COLORS = Shoes::COLORS
  i = 45
  button 'new'do
    i += 5
    box = rand(2) == 0 ? rect(i, i, 20) : oval(i, i, 20)
    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

2 entries across 2 versions & 1 rubygems

Version Path
shoes-4.0.0.pre2 samples/sample13.rb
shoes-4.0.0.pre1 samples/sample13.rb