mirror of
https://github.com/cyberarm/i-mic-rts.git
synced 2025-12-15 15:52:34 +00:00
Added custom cursors
This commit is contained in:
@@ -4,6 +4,7 @@ class IMICRTS
|
||||
def setup
|
||||
@last_update_time = Gosu.milliseconds
|
||||
@mouse = CyberarmEngine::Vector.new
|
||||
@cursor = Gosu::Image.new("#{IMICRTS::ASSETS_PATH}/cursors/pointer.png")
|
||||
|
||||
self.caption = "#{IMICRTS::NAME} (#{IMICRTS::VERSION} #{IMICRTS::VERSION_NAME})"
|
||||
if ARGV.join.include?("--debug-game")
|
||||
@@ -15,6 +16,12 @@ class IMICRTS
|
||||
end
|
||||
end
|
||||
|
||||
def draw
|
||||
@cursor.draw(mouse_x, mouse_y, Float::INFINITY)
|
||||
|
||||
super
|
||||
end
|
||||
|
||||
def update
|
||||
@mouse.x, @mouse.y = self.mouse_x, self.mouse_y
|
||||
super
|
||||
@@ -22,6 +29,10 @@ class IMICRTS
|
||||
@last_update_time = Gosu.milliseconds
|
||||
end
|
||||
|
||||
def needs_cursor?
|
||||
return false
|
||||
end
|
||||
|
||||
def close
|
||||
push_state(Closing) unless current_state.is_a?(Closing)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user