Sha256: b98308b8eefa2bc26e2a2e64ff2de819a1065f96eb011049d931ed3308b49478

Contents?: true

Size: 348 Bytes

Versions: 1

Compression:

Stored size: 348 Bytes

Contents

# frozen_string_literal: true

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

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.rc1 samples/simple_button_animate.rb