Sha256: 5634cc6ab5aa11872f11e61398c5745110782e5b5f2f8c6bfe57dd05c16adf3c

Contents?: true

Size: 317 Bytes

Versions: 2

Compression:

Stored size: 317 Bytes

Contents

Shoes.app do
  flow margin: 12 do
    # Set up three buttons
    button "Stop" do
      @anim.stop
    end
    @two = button "Watch Me!"
    button "Start" do
      @anim.start
    end
    # Bounce the second button
    @anim = animate do |frame|
      @two.displace(0, (Math.sin(frame) * 30).to_i)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shoes-4.0.0.pre2 samples/simple-button-animate.rb
shoes-4.0.0.pre1 samples/simple-button-animate.rb