From 51363d2e3d4b40eecad64057eac67313d4b5f5b4 Mon Sep 17 00:00:00 2001 From: Cyberarm Date: Wed, 26 May 2021 23:18:52 +0000 Subject: [PATCH] Changed HUD text to have solid black 'border' --- lib/hud/widgets/ammo.rb | 12 ++++++------ lib/hud/widgets/chat.rb | 2 +- lib/hud/widgets/chat_history.rb | 7 ++----- lib/hud/widgets/health.rb | 2 +- lib/hud/widgets/radar.rb | 2 +- lib/hud/widgets/score_board.rb | 7 ++----- lib/hud/widgets/squad.rb | 4 +--- 7 files changed, 14 insertions(+), 22 deletions(-) diff --git a/lib/hud/widgets/ammo.rb b/lib/hud/widgets/ammo.rb index 499c99d..645f55b 100644 --- a/lib/hud/widgets/ammo.rb +++ b/lib/hud/widgets/ammo.rb @@ -4,16 +4,16 @@ class IMICFPS class HUD class AmmoWidget < HUD::Widget def setup - @text = Text.new("", size: 64, mode: :add, font: MONOSPACE_FONT) + @text = Text.new("", size: 64, font: MONOSPACE_FONT, shadow: true, shadow_color: Gosu::Color::BLACK) @background = Gosu::Color.new(0x88c64600) end def draw - Gosu.draw_rect( - @text.x - Widget.padding, @text.y - Widget.padding, - @text.width + Widget.padding * 2, @text.height + Widget.padding * 2, - @background - ) + # Gosu.draw_rect( + # @text.x - Widget.padding, @text.y - Widget.padding, + # @text.width + Widget.padding * 2, @text.height + Widget.padding * 2, + # @background + # ) @text.draw end diff --git a/lib/hud/widgets/chat.rb b/lib/hud/widgets/chat.rb index 6403686..af28a51 100644 --- a/lib/hud/widgets/chat.rb +++ b/lib/hud/widgets/chat.rb @@ -4,7 +4,7 @@ class IMICFPS class HUD class ChatWidget < HUD::Widget def setup - @text = Text.new("", size: 28, mode: :add, font: SANS_FONT) + @text = Text.new("", size: 28, font: SANS_FONT) @background = Gosu::Color.new(0x88c64600) end diff --git a/lib/hud/widgets/chat_history.rb b/lib/hud/widgets/chat_history.rb index 9205d68..54fd23b 100644 --- a/lib/hud/widgets/chat_history.rb +++ b/lib/hud/widgets/chat_history.rb @@ -10,11 +10,8 @@ class IMICFPS "", size: 16, x: Widget.margin, y: Widget.margin, z: 45, - shadow_size: 0.5, - shadow_alpha: 0, - shadow_color: Gosu::Color::WHITE, - mode: :add, - font: SANS_FONT + shadow_color: Gosu::Color::BLACK, + font: BOLD_SANS_FONT ) @last_message_time = 0 diff --git a/lib/hud/widgets/health.rb b/lib/hud/widgets/health.rb index 6d283d0..14b4344 100644 --- a/lib/hud/widgets/health.rb +++ b/lib/hud/widgets/health.rb @@ -5,7 +5,7 @@ class IMICFPS class HealthWidget < HUD::Widget def setup @spacer = 0 - @text = Text.new("", mode: :add, font: MONOSPACE_FONT) + @text = Text.new("", font: MONOSPACE_FONT, shadow: true, shadow_color: Gosu::Color::BLACK) @width = 512 @height = 24 @slant = 32 diff --git a/lib/hud/widgets/radar.rb b/lib/hud/widgets/radar.rb index 7a59dcb..e83f521 100644 --- a/lib/hud/widgets/radar.rb +++ b/lib/hud/widgets/radar.rb @@ -12,7 +12,7 @@ class IMICFPS @border_color = Gosu::Color.new(0x88c64600) @radar_color = Gosu::Color.new(0x88212121) - @text = Text.new("RADAR", size: 18, mode: :add, font: MONOSPACE_FONT) + @text = Text.new("RADAR", size: 18, font: MONOSPACE_FONT, shadow: true, shadow_color: Gosu::Color::BLACK) @image = Gosu::Image.new("#{CYBERARM_ENGINE_ROOT_PATH}/assets/textures/default.png", retro: true) @scale = (@size - Widget.padding * 2.0) / @image.width end diff --git a/lib/hud/widgets/score_board.rb b/lib/hud/widgets/score_board.rb index 5b8c00e..95f7174 100644 --- a/lib/hud/widgets/score_board.rb +++ b/lib/hud/widgets/score_board.rb @@ -11,11 +11,8 @@ class IMICFPS size: 16, x: Widget.margin, y: Widget.margin, z: 45, shadow: true, - shadow_size: 0.5, - shadow_alpha: 30, - shadow_color: Gosu::Color::WHITE, - mode: :add, - font: MONOSPACE_FONT + shadow_color: Gosu::Color::BLACK, + font: BOLD_SANS_FONT ) set_text diff --git a/lib/hud/widgets/squad.rb b/lib/hud/widgets/squad.rb index fec5125..51597af 100644 --- a/lib/hud/widgets/squad.rb +++ b/lib/hud/widgets/squad.rb @@ -14,12 +14,10 @@ class IMICFPS @text = Text.new( "MATE\nTinyTanker\nOther Player Dude\nHuman 0xdeadbeef", size: 18, - mode: :add, font: SANS_FONT, color: @color, shadow: true, - shadow_color: 0x88000000, - shadow_size: 0.75 + shadow_color: Gosu::Color::BLACK, ) end