Moved collision/physics information into manifest, made real mouse cursor always invisible and use 'virtual' cursor when needed.

This commit is contained in:
2019-09-28 13:29:21 -05:00
parent e038dcbe24
commit 40d1105fb8
13 changed files with 32 additions and 30 deletions

View File

@@ -226,8 +226,8 @@ class IMICFPS
@active_text_input = window.text_input
window.text_input = @text_input
@showing_cursor = window.show_cursor
window.show_cursor = true
@showing_cursor = window.needs_cursor
window.needs_cursor = true
@show_caret = true
@caret_last_change = Gosu.milliseconds
@@ -235,7 +235,7 @@ class IMICFPS
def blur
window.text_input = @active_text_input
window.show_cursor = @showing_cursor
window.needs_cursor = @showing_cursor
end
end
end

View File

@@ -6,6 +6,7 @@ class IMICFPS
@slope = 250
@color_step = 10
@base_color = Gosu::Color.rgb(255, 127, 0)
window.needs_cursor = true
super(*args)
end
@@ -55,13 +56,15 @@ class IMICFPS
end
# Cursor
fill_quad(
mouse_x, mouse_y,
mouse_x+16, mouse_y,
mouse_x, mouse_y+16,
mouse_x, mouse_y+16,
Gosu::Color::WHITE, Float::INFINITY
)
if window.needs_cursor
fill_quad(
mouse_x, mouse_y,
mouse_x+16, mouse_y,
mouse_x, mouse_y+16,
mouse_x, mouse_y+16,
Gosu::Color::WHITE, Float::INFINITY
)
end
end
def update