aboutsummaryrefslogtreecommitdiffstats
path: root/src/i_help.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-05-10 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-05-10 20:20:20 +0200
commit70c7c5d6e110d42dd2d8404268d283baf78626fb (patch)
treecdfd6efd09c9237351f72c54357e10549326b066 /src/i_help.go
parenthelp (diff)
downloadhardflip-70c7c5d6e110d42dd2d8404268d283baf78626fb.tar.gz
hardflip-70c7c5d6e110d42dd2d8404268d283baf78626fb.tar.bz2
hardflip-70c7c5d6e110d42dd2d8404268d283baf78626fb.tar.xz
hardflip-70c7c5d6e110d42dd2d8404268d283baf78626fb.tar.zst
hardflip-70c7c5d6e110d42dd2d8404268d283baf78626fb.zip
go
Diffstat (limited to 'src/i_help.go')
-rw-r--r--src/i_help.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/i_help.go b/src/i_help.go
index 335d5d2..bafe1e2 100644
--- a/src/i_help.go
+++ b/src/i_help.go
@@ -51,6 +51,8 @@
package main
+import "github.com/gdamore/tcell/v2"
+
func i_draw_help(ui HardUI) {
if ui.dim[W] < 12 || ui.dim[H] < 6 {
return
@@ -65,8 +67,16 @@ func i_draw_help(ui HardUI) {
win.L, win.T, win.R, win.B,
ui.style[BOX_STYLE], ui.style[HEAD_STYLE],
" Keys ", true)
- i_help_normal(ui)
+ line := 0
+ i_help_normal(ui, win, &line)
}
-func i_help_normal(ui HardUI) {
+func i_help_normal(ui HardUI, win Quad, line *int) {
+ for _, v := range HELP_NORMAL_KEYS {
+ i_draw_text(ui.s, win.L + 4, win.T + 1 + *line, win.R - 1, win.T + 1 + *line,
+ ui.style[DEF_STYLE], v[0])
+ i_draw_text(ui.s, win.L + 10, win.T + 1 + *line, win.R - 1, win.T + 1 + *line,
+ ui.style[DEF_STYLE], v[1])
+ *line += 1
+ }
}