mirror of
https://github.com/cyberarm/i-mic-fps.git
synced 2025-12-15 15: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 HUD
|
||||||
class AmmoWidget < HUD::Widget
|
class AmmoWidget < HUD::Widget
|
||||||
def setup
|
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)
|
@background = Gosu::Color.new(0x88c64600)
|
||||||
end
|
end
|
||||||
|
|
||||||
def draw
|
def draw
|
||||||
Gosu.draw_rect(
|
# Gosu.draw_rect(
|
||||||
@text.x - Widget.padding, @text.y - Widget.padding,
|
# @text.x - Widget.padding, @text.y - Widget.padding,
|
||||||
@text.width + Widget.padding * 2, @text.height + Widget.padding * 2,
|
# @text.width + Widget.padding * 2, @text.height + Widget.padding * 2,
|
||||||
@background
|
# @background
|
||||||
)
|
# )
|
||||||
@text.draw
|
@text.draw
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class IMICFPS
|
|||||||
class HUD
|
class HUD
|
||||||
class ChatWidget < HUD::Widget
|
class ChatWidget < HUD::Widget
|
||||||
def setup
|
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)
|
@background = Gosu::Color.new(0x88c64600)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -10,11 +10,8 @@ class IMICFPS
|
|||||||
"",
|
"",
|
||||||
size: 16,
|
size: 16,
|
||||||
x: Widget.margin, y: Widget.margin, z: 45,
|
x: Widget.margin, y: Widget.margin, z: 45,
|
||||||
shadow_size: 0.5,
|
shadow_color: Gosu::Color::BLACK,
|
||||||
shadow_alpha: 0,
|
font: BOLD_SANS_FONT
|
||||||
shadow_color: Gosu::Color::WHITE,
|
|
||||||
mode: :add,
|
|
||||||
font: SANS_FONT
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@last_message_time = 0
|
@last_message_time = 0
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ class IMICFPS
|
|||||||
class HealthWidget < HUD::Widget
|
class HealthWidget < HUD::Widget
|
||||||
def setup
|
def setup
|
||||||
@spacer = 0
|
@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
|
@width = 512
|
||||||
@height = 24
|
@height = 24
|
||||||
@slant = 32
|
@slant = 32
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ class IMICFPS
|
|||||||
@border_color = Gosu::Color.new(0x88c64600)
|
@border_color = Gosu::Color.new(0x88c64600)
|
||||||
@radar_color = Gosu::Color.new(0x88212121)
|
@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)
|
@image = Gosu::Image.new("#{CYBERARM_ENGINE_ROOT_PATH}/assets/textures/default.png", retro: true)
|
||||||
@scale = (@size - Widget.padding * 2.0) / @image.width
|
@scale = (@size - Widget.padding * 2.0) / @image.width
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -11,11 +11,8 @@ class IMICFPS
|
|||||||
size: 16,
|
size: 16,
|
||||||
x: Widget.margin, y: Widget.margin, z: 45,
|
x: Widget.margin, y: Widget.margin, z: 45,
|
||||||
shadow: true,
|
shadow: true,
|
||||||
shadow_size: 0.5,
|
shadow_color: Gosu::Color::BLACK,
|
||||||
shadow_alpha: 30,
|
font: BOLD_SANS_FONT
|
||||||
shadow_color: Gosu::Color::WHITE,
|
|
||||||
mode: :add,
|
|
||||||
font: MONOSPACE_FONT
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set_text
|
set_text
|
||||||
|
|||||||
@@ -14,12 +14,10 @@ class IMICFPS
|
|||||||
@text = Text.new(
|
@text = Text.new(
|
||||||
"MATE\nTinyTanker\nOther Player Dude\nHuman 0xdeadbeef",
|
"MATE\nTinyTanker\nOther Player Dude\nHuman 0xdeadbeef",
|
||||||
size: 18,
|
size: 18,
|
||||||
mode: :add,
|
|
||||||
font: SANS_FONT,
|
font: SANS_FONT,
|
||||||
color: @color,
|
color: @color,
|
||||||
shadow: true,
|
shadow: true,
|
||||||
shadow_color: 0x88000000,
|
shadow_color: Gosu::Color::BLACK,
|
||||||
shadow_size: 0.75
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user