mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15:42:35 +00:00
Added overlay for future fps and stats display
This commit is contained in:
17
lib/overlay.rb
Normal file
17
lib/overlay.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class IMICFPS
|
||||
class Overlay
|
||||
include CommonMethods
|
||||
def initialize
|
||||
@text = CyberarmEngine::Text.new("")
|
||||
end
|
||||
|
||||
def draw
|
||||
Gosu.draw_rect(0, 0, 256, 20, Gosu::Color.rgba(0, 0, 0, 100))
|
||||
Gosu.draw_rect(2, 2, 256 - 4, 20 - 4, Gosu::Color.rgba(100, 100, 100, 100))
|
||||
@text.x = 3
|
||||
@text.y = 3
|
||||
@text.text = "FPS: #{Gosu.fps}"
|
||||
@text.draw
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user