Advertisement
Guest User

drag&drop in Ruby Shoes

a guest
Dec 7th, 2012
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.47 KB | None | 0 0
  1. Shoes.app :title => "Residuos" do
  2.   @residuos = image "focos_ahorradores.jpg",
  3.     :top => "50",
  4.     :left => "50",
  5.     :width => 50,
  6.     :height => 50
  7.   @basuras = image "funda_roja.jpg",
  8.     :top => "100",
  9.     :left => "100",
  10.     :width => 50,
  11.     :height => 50
  12.     @residuos.click do
  13.       @presionado=true
  14.       @basuras.click do
  15.       @presionado=false
  16.       @residuos.clear
  17.     end
  18.   end
  19.     motion do |left, top|
  20.         @residuos.move(left, top) if @presionado
  21.     end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement