summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike JS. Choi <mkchoi212@icloud.com>2018-01-05 22:45:00 -0600
committerMike JS. Choi <mkchoi212@icloud.com>2018-01-05 22:45:00 -0600
commitd6d7362617bd3535f80c2c46e64cd8c4015702a0 (patch)
treec05411a69309c188ed68a1b2ac1d6d0ba6d6e22d
parent58415774022b3476505fd20dc66f21ecd71374e5 (diff)
Update size of prompt panel to fit new prompt stringv1.0.3
-rw-r--r--layout.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/layout.go b/layout.go
index 7d2f1bb..5320cda 100644
--- a/layout.go
+++ b/layout.go
@@ -108,17 +108,19 @@ func makePrompt(g *gocui.Gui) error {
inputHeight := 2
viewHeight := maxY - inputHeight
- if v, err := g.SetView(Prompt, 0, viewHeight, 14, viewHeight+inputHeight); err != nil {
+ // Instruction View
+ if v, err := g.SetView(Prompt, 0, viewHeight, 19, viewHeight+inputHeight); err != nil {
if err != gocui.ErrUnknownView {
return err
}
v.Frame = false
- prompt := color.Green(color.Regular, "[wasd] >>")
+ prompt := color.Green(color.Regular, promptString)
v.Write([]byte(prompt))
v.MoveCursor(11, 0, true)
}
- if v, err := g.SetView(Input, 10, viewHeight, maxX, viewHeight+inputHeight); err != nil {
+ // Input View
+ if v, err := g.SetView(Input, 15, viewHeight, maxX, viewHeight+inputHeight); err != nil {
if err != gocui.ErrUnknownView {
return err
}