diff options
author | Mike JS. Choi <mkchoi212@icloud.com> | 2018-01-05 22:45:00 -0600 |
---|---|---|
committer | Mike JS. Choi <mkchoi212@icloud.com> | 2018-01-05 22:45:00 -0600 |
commit | d6d7362617bd3535f80c2c46e64cd8c4015702a0 (patch) | |
tree | c05411a69309c188ed68a1b2ac1d6d0ba6d6e22d | |
parent | 58415774022b3476505fd20dc66f21ecd71374e5 (diff) |
Update size of prompt panel to fit new prompt stringv1.0.3
-rw-r--r-- | layout.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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 } |