Added more hud widgets for showing squadmates and crosshair, added crosshair image and source svg, hackish fix to make renderer resize on windows size change, added CameraController camera control is back in 😂

This commit is contained in:
2020-07-18 15:54:00 -05:00
parent f6e4a509fd
commit 1d7cd19b41
9 changed files with 282 additions and 22 deletions

21
lib/hud/widgets/squad.rb Normal file
View File

@@ -0,0 +1,21 @@
class IMICFPS
class HUD
class SquadWidget < HUD::Widget
def setup
@size = 288 # RADAR size
@color = Gosu::Color.new(0x8800aa00)
@text = Text.new("MATE\nTinyTanker\nOther Player Dude\nHuman 0xdeadbeef", size: 18, mode: :add, font: MONOSPACE_FONT, color: @color)
end
def draw
@text.draw
end
def update
@text.x = @margin + @size + @padding
@text.y = window.height - (@margin + @text.height)
end
end
end
end