diff options
author | Joe <rbo@gmx.us> | 2024-05-13 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-05-13 20:20:20 +0200 |
commit | 85c5875689e91a8c7888f11217b9fe94e2d9fa71 (patch) | |
tree | ac82cb7fad3b822772c1625974e2268a03c6f48f /src/i_help.go | |
parent | qwe (diff) | |
download | hardflip-85c5875689e91a8c7888f11217b9fe94e2d9fa71.tar.gz hardflip-85c5875689e91a8c7888f11217b9fe94e2d9fa71.tar.bz2 hardflip-85c5875689e91a8c7888f11217b9fe94e2d9fa71.tar.xz hardflip-85c5875689e91a8c7888f11217b9fe94e2d9fa71.tar.zst hardflip-85c5875689e91a8c7888f11217b9fe94e2d9fa71.zip |
go
Diffstat (limited to '')
-rw-r--r-- | src/i_help.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/i_help.go b/src/i_help.go index cd8a5bd..c022012 100644 --- a/src/i_help.go +++ b/src/i_help.go @@ -80,6 +80,7 @@ func i_draw_help(ui *HardUI) { } func i_help_normal(ui HardUI, win Quad, line *int) bool { + delim := 17 for _, v := range HELP_NORMAL_KEYS { if *line < 0 { *line += 1 @@ -87,10 +88,11 @@ func i_help_normal(ui HardUI, win Quad, line *int) bool { } else if win.T + *line + 1 >= win.B { return false } - i := 13 - len(v[0]) - i_draw_text(ui.s, win.L + 1 + i, win.T + 1 + *line, win.L + 14, + i := delim - 1 - len(v[0]) + if i < 0 { i = 0 } + i_draw_text(ui.s, win.L + 1 + i, win.T + 1 + *line, win.L + delim, win.T + 1 + *line, ui.style[BOT_STYLE], v[0]) - i_draw_text(ui.s, win.L + 15, win.T + 1 + *line, win.R - 1, + i_draw_text(ui.s, win.L + delim + 1, win.T + 1 + *line, win.R, win.T + 1 + *line, ui.style[DEF_STYLE], v[1]) *line += 1 } |