aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorywang <yw05@forksworld.de>2021-01-05 00:03:16 +0100
committerywang <yw05@forksworld.de>2021-01-05 00:03:16 +0100
commit741ed7b4a763838a45336bcc866ab6e29928266c (patch)
treeaac6ee23f308e9d3897c851551ecee387e640cb6
parent501911f94c274552ab7fdd3c371edb2814cb9bc5 (diff)
downloadadvtrains-741ed7b4a763838a45336bcc866ab6e29928266c.tar.gz
advtrains-741ed7b4a763838a45336bcc866ab6e29928266c.tar.bz2
advtrains-741ed7b4a763838a45336bcc866ab6e29928266c.zip
Revert to black background; use "blocks" for the (physical) maximum speed
-rw-r--r--advtrains/trainhud.lua11
1 files changed, 5 insertions, 6 deletions
diff --git a/advtrains/trainhud.lua b/advtrains/trainhud.lua
index 074a739..4f3fb43 100644
--- a/advtrains/trainhud.lua
+++ b/advtrains/trainhud.lua
@@ -192,7 +192,7 @@ function advtrains.hud_train_format(train, flip)
local st = {}
if train.debug then st = {train.debug} end
- local ht = {"[combine:300x150:0,0=(advtrains_hud_bg.png^[resize\\:300x150^[colorize\\:gray)"}
+ local ht = {"[combine:300x150:0,0=(advtrains_hud_bg.png^[resize\\:300x150)"}
ht[#ht+1] = "100,0=(advtrains_hud_" .. (flip and "reverse" or "forward") .. ".png^[resize\\:100x20^[makealpha\\:#000000)"
ht[#ht+1] = "200,0=(advtrains_hud_" .. (levers[tlev] or "bg") .. ".png^[resize\\:100x20^[multiply\\:" .. (lvrcolor[tlev] or "#000000") .. "^[makealpha\\:#000000)"
if train.tarvelocity or train.atc_command then
@@ -248,12 +248,11 @@ function advtrains.hud_train_format(train, flip)
end
sevenseg(math.floor(vel/10), 5, 5, 20, 10, "[colorize\\:red\\:255")
sevenseg(vel%10, 55, 5, 20, 10, "[colorize\\:red\\:255")
- ht[#ht+1] = sformat("10,100=(advtrains_hud_bg.png^[resize\\:%dx30^[colorize\\:white\\:255)", vel*14)
- if max < 20 then
- ht[#ht+1] = sformat("%d,100=(advtrains_hud_bg.png^[resize\\:%dx30^[colorize\\:lightgray\\:255)", 10+max*14, 280-max*14)
+ for i = 1, vel, 1 do
+ ht[#ht+1] = sformat("%d,100=(advtrains_hud_bg.png^[resize\\:11x30^[colorize\\:white)", i*14-3)
end
- for i = 1, max-1, 1 do
- ht[#ht+1] = sformat("%d,100=(advtrains_hud_bg.png^[resize\\:3x30^[colorize\\:gray)", 8+i*14)
+ for i = max+1, 20, 1 do
+ ht[#ht+1] = sformat("%d,100=(advtrains_hud_bg.png^[resize\\:11x30^[colorize\\:lightgray)", i*14-3)
end
if res and res > 0 then
ht[#ht+1] = sformat("%d,95=(advtrains_hud_bg.png^[resize\\:3x40^[colorize\\:red\\:255)", 8+res*14)