mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-13 06:42:35 +00:00
Changed HUD text to have solid black 'border'
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user