diff options
author | Joe <rbo@gmx.us> | 2024-04-05 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-04-05 20:20:20 +0200 |
commit | b356c5ea57b76143fa2b61423e85ea188bf05192 (patch) | |
tree | f832cf9c299be7078fea778e1ca5180078a9885d /src | |
parent | i cant find a way (diff) | |
download | hardflip-b356c5ea57b76143fa2b61423e85ea188bf05192.tar.gz hardflip-b356c5ea57b76143fa2b61423e85ea188bf05192.tar.bz2 hardflip-b356c5ea57b76143fa2b61423e85ea188bf05192.tar.xz hardflip-b356c5ea57b76143fa2b61423e85ea188bf05192.tar.zst hardflip-b356c5ea57b76143fa2b61423e85ea188bf05192.zip |
ok
Diffstat (limited to '')
-rw-r--r-- | src/i_events.go | 4 | ||||
-rw-r--r-- | src/i_insert.go | 17 |
2 files changed, 9 insertions, 12 deletions
diff --git a/src/i_events.go b/src/i_events.go index cc7c4be..de0a99a 100644 --- a/src/i_events.go +++ b/src/i_events.go @@ -600,6 +600,10 @@ func i_events(data *HardData) { case 11: data.ui.insert_sel_ok = false i_insert_check_ok(data, data.insert) + if data.insert_err != nil { + break + } + i_insert_host(data, data.insert) } } } else { diff --git a/src/i_insert.go b/src/i_insert.go index f21fdd9..f57c458 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -53,13 +53,16 @@ package main import ( "errors" - // "fmt" "os" "strconv" "github.com/gdamore/tcell/v2" ) +func i_insert_host(data *HardData, insert *HostNode) { + tmp_next := data.litems.curr.next +} + func i_insert_check_ok(data *HardData, insert *HostNode) { if len(insert.Name) == 0 { data.insert_err = append(data.insert_err, errors.New("no name")) @@ -141,8 +144,6 @@ func i_draw_ok_butt(ui HardUI, line int, id, selected int) { (ui.dim[W] / 2) + (butt_size / 2), line, style, buff) } -var start_line int - func i_draw_insert_panel(ui HardUI, in *HostNode) { if len(in.Name) == 0 { return @@ -168,15 +169,7 @@ func i_draw_insert_panel(ui HardUI, in *HostNode) { } if win.T + end_line >= win.B { ui.s.SetContent(ui.dim[W] / 2, win.B, '▼', nil, ui.style[BOX_STYLE]) - // ui.s.Fini() - // fmt.Println("end_line ", end_line) - // fmt.Println("win.T ", win.T) - // fmt.Println("win.T+end", win.T + end_line) - // fmt.Println("win.B ", win.B) - // fmt.Println("insert_sel ", ui.insert_sel) - // fmt.Println("insert_max ", ui.insert_sel_max) - // os.Exit(0) - // TODO: here + // TODO: scroll or something } } |