On Thu, Jun 05, 2008 at 06:19:17PM +0200, Axel Etzold wrote:
> thanks for your response. However, I want to read out the position of the 
> mouse as it is
> moved by the user, not by Shoes.

Collin's got it.  The `motion` event happens whenever the mouse is
moved by the user.

  Shoes.app do
    @txt = para "0 x 0"
    motion do |x, y|
      @txt.replace "#{x} x #{y}"
    end
  end

If you're in an animation, you can just use the `mouse` method.

  Shoes.app do
    @txt = para "0 x 0"
    animate do
      button, x, y = self.mouse
      @txt.replace "#{x} x #{y}"
    end
  end

_why

Reply via email to