Added overlay for future fps and stats display

This commit is contained in:
2020-05-02 17:34:19 -05:00
parent 27de5667be
commit 9593d341bf
7 changed files with 68 additions and 9 deletions

17
lib/overlay.rb Normal file
View 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