aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-04-15 20:20:20 +0200
committerJoe <rbo@gmx.us>2024-04-15 20:20:20 +0200
commit494f868e4ba40c39b291a1eee5f94a0c94035b42 (patch)
tree2d42bb5f48df27504f5f126656b65ac0a075c926
parentmaproad (diff)
downloadhardflip-494f868e4ba40c39b291a1eee5f94a0c94035b42.tar.gz
hardflip-494f868e4ba40c39b291a1eee5f94a0c94035b42.tar.bz2
hardflip-494f868e4ba40c39b291a1eee5f94a0c94035b42.tar.xz
hardflip-494f868e4ba40c39b291a1eee5f94a0c94035b42.tar.zst
hardflip-494f868e4ba40c39b291a1eee5f94a0c94035b42.zip
gogo
-rw-r--r--src/c_defs.go12
-rw-r--r--src/i_insert.go5
2 files changed, 16 insertions, 1 deletions
diff --git a/src/c_defs.go b/src/c_defs.go
index f0126da..241ff0c 100644
--- a/src/c_defs.go
+++ b/src/c_defs.go
@@ -127,14 +127,24 @@ const (
INS_RDP_USER
INS_RDP_PASS
INS_RDP_FILE
+ INS_RDP_SCREENSIZE
+ // TODO: here (dynamic)
INS_RDP_QUALITY
- // TODO: here
INS_RDP_OK
)
var (
HOST_ICONS = [4]string{" ", " ", " ", "󰅟 "}
DIRS_ICONS = [2]string{" ", " "}
+ RDP_SCREENSIZE = [7]string{
+ "800x600",
+ "1280x720",
+ "1360x768",
+ "1600x900",
+ "1600x1200",
+ "1920x1080",
+ "2560x1440",
+ }
RDP_QUALITY = [3]string{"Low", "Medium", "High"}
PROTOCOL_STR = [PROTOCOL_MAX + 1]string{
"SSH",
diff --git a/src/i_insert.go b/src/i_insert.go
index 1b87b3a..907f041 100644
--- a/src/i_insert.go
+++ b/src/i_insert.go
@@ -362,6 +362,11 @@ func i_draw_insert_rdp(ui HardUI, line int, win Quad, in *HostNode) int {
i_draw_text(ui.s, ui.dim[W] / 2 - len(text) / 2, win.T + line, win.R - 1,
win.T + line, ui.style[DEF_STYLE], text)
if line += 2; win.T + line >= win.B { return line }
+ screensize := strconv.Itoa(int(in.Width)) + "x" +
+ strconv.Itoa(int(in.Height))
+ 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_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 }