Sha256: 9e696bfec5703e2006e64f3225e9efc9835f918948b645ac7a2fb13bd8f45acf
Contents?: true
Size: 649 Bytes
Versions: 1
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true Shoes.app do # Shoes 3 doesn't support button.text position_report = ->(button, button_text) { @position_report.replace "#{button_text}: (#{button.left}, #{button.top})" } flow margin: 12 do # Set up three buttons button "One", click: proc { |button| position_report.call(button, "One") } @two = button "Two", click: proc { |button| position_report.call(button, "Two") } button "Three", click: proc { |button| position_report.call(button, "Three") } @position_report = para '' # Bounce the second button animate do |i| @two.displace(0, (Math.sin(i) * 6).to_i) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-4.0.0.rc1 | samples/simple_displace.rb |