Changed HUD text to have solid black 'border'

This commit is contained in:
2021-05-26 23:18:52 +00:00
parent a16e14b0e5
commit 51363d2e3d
7 changed files with 14 additions and 22 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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