diff options
author | Joe <rbo@gmx.us> | 2024-04-15 20:20:20 +0200 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-04-15 20:20:20 +0200 |
commit | dde1a1b8554a6ebc3725ce730b62655c77cda01a (patch) | |
tree | 8e1bc16118d4260f47ad1f2d00ab4905a3260f06 /src/i_insert.go | |
parent | gogo (diff) | |
download | hardflip-dde1a1b8554a6ebc3725ce730b62655c77cda01a.tar.gz hardflip-dde1a1b8554a6ebc3725ce730b62655c77cda01a.tar.bz2 hardflip-dde1a1b8554a6ebc3725ce730b62655c77cda01a.tar.xz hardflip-dde1a1b8554a6ebc3725ce730b62655c77cda01a.tar.zst hardflip-dde1a1b8554a6ebc3725ce730b62655c77cda01a.zip |
coool
Diffstat (limited to 'src/i_insert.go')
-rw-r--r-- | src/i_insert.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/i_insert.go b/src/i_insert.go index 907f041..f51cffd 100644 --- a/src/i_insert.go +++ b/src/i_insert.go @@ -218,6 +218,26 @@ func i_insert_check_ok(data *HardData, in *HostNode) { } } +func i_draw_tick_box(ui HardUI, line int, dim Quad, label string, content bool, + id, selected int, red bool) { + tbox_style := ui.style[DEF_STYLE].Background(tcell.ColorBlack).Dim(true) + + if id == selected { + tbox_style = tbox_style.Reverse(true).Dim(false) + } + l := ui.dim[W] / 2 - len(label) - 2 + if l <= dim.L { l = dim.L + 1 } + i_draw_text(ui.s, l, line, ui.dim[W] / 2, line, + ui.style[DEF_STYLE], label) + x := " " + if content == true { + x = "x" + } + i_draw_text(ui.s, ui.dim[W] / 2, line, dim.R, line, + tbox_style, + "[" + x + "]") +} + func i_draw_text_box(ui HardUI, line int, dim Quad, label, content string, id, selected int, red bool) { const tbox_size int = 14 @@ -367,6 +387,9 @@ func i_draw_insert_rdp(ui HardUI, line int, win Quad, in *HostNode) int { i_draw_text_box(ui, win.T + line, win, "Window size", screensize, INS_RDP_SCREENSIZE, ui.insert_sel, red) if line += 1; win.T + line >= win.B { return line } + i_draw_tick_box(ui, win.T + line, win, "Dynamic window", in.Dynamic, + INS_RDP_DYNAMIC, ui.insert_sel, red) + if line += 1; win.T + line >= win.B { return line } i_draw_text_box(ui, win.T + line, win, "Quality", RDP_QUALITY[in.Quality], INS_RDP_QUALITY, ui.insert_sel, red) if line += 2; win.T + line >= win.B { return line } |