This commit is contained in:
2020-07-19 09:42:55 -05:00
parent 4ee97cca4b
commit d72e8ccbd0
15 changed files with 91 additions and 110 deletions

View File

@@ -2,7 +2,11 @@ class IMICFPS
class HUD
class SquadWidget < HUD::Widget
def setup
@size = 288 # RADAR size
@min_size = 148
@max_size = 288 # RADAR size
@target_screen_width = 1920
@size = @max_size
@color = Gosu::Color.new(0xff00aa00)
@text = Text.new(
@@ -22,6 +26,8 @@ class IMICFPS
end
def update
@size = (window.width / @target_screen_width.to_f * @max_size).clamp(@min_size, @max_size)
@text.x = Widget.margin + @size + Widget.padding
@text.y = window.height - (Widget.margin + @text.height)
end