diff options
Diffstat (limited to 'player/lua/stats.lua')
-rw-r--r-- | player/lua/stats.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/player/lua/stats.lua b/player/lua/stats.lua index 9401a9032c..50288fade4 100644 --- a/player/lua/stats.lua +++ b/player/lua/stats.lua @@ -162,11 +162,13 @@ local function text_style() if o.custom_header and o.custom_header ~= "" then return o.custom_header else - return format("{\\r}{\\an7}{\\fs%d}{\\fn%s}{\\bord%f}{\\3c&H%s&}" .. - "{\\1c&H%s&}{\\alpha&H%s&}{\\xshad%f}{\\yshad%f}{\\4c&H%s&}", + local has_shadow = mp.get_property('osd-back-color'):sub(2, 3) == '00' + return format("{\\r\\an7\\fs%d\\fn%s\\bord%f\\3c&H%s&" .. + "\\1c&H%s&\\1a&H%s&\\3a&H%s&" .. + (has_shadow and "\\4a&H%s&\\xshad%f\\yshad%f\\4c&H%s&}" or "}"), o.font_size, o.font, o.border_size, - o.border_color, o.font_color, o.alpha, o.shadow_x_offset, - o.shadow_y_offset, o.shadow_color) + o.border_color, o.font_color, o.alpha, o.alpha, o.alpha, + o.shadow_x_offset, o.shadow_y_offset, o.shadow_color) end end |