Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu 0.9.2 released

This board is threaded (i.e. has a tree structure). Please use the Reply button of the specific post you are referring to, not just any random button. If you want to reply to the topic in general, use the Post button near the top and bottom of the page.

Post Reply
In Response to bestguigui
Hi !

I have another issue : when I use mouse_x= and mouse_y= to place my pointor, only the second called method is taken.

For example the following code :

require 'gosu'

class Window < Gosu::Window
  def initialize
    super(640, 480, false)
  end
 
  def needs_cursor?; true; end
 
  def update
    self.mouse_x = self.width / 2
    self.mouse_y = self.height / 2
  end
end

Window.new.show

will put the mouse pointor on the horizontal left but centered vertically... I now have to use the deprecated method set_mouse_position(x, y) instead if I want to set the mouse where I want.

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill