mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 23:52:35 +00:00
Misc.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user