navigation tips rendering enhancements

This commit is contained in:
sqshq 2019-06-09 13:00:47 -04:00
parent 227dc81036
commit e7aa9691bc
1 changed files with 1 additions and 11 deletions

View File

@ -123,7 +123,6 @@ func (m *Menu) Draw(buffer *ui.Buffer) {
func (m *Menu) renderHighlight(buffer *ui.Buffer) { func (m *Menu) renderHighlight(buffer *ui.Buffer) {
arrowsText := "Use mouse or keyboard for selection"
optionsText := "<ENTER> to view options" optionsText := "<ENTER> to view options"
resumeText := "<ESC> to resume" resumeText := "<ESC> to resume"
@ -136,16 +135,7 @@ func (m *Menu) renderHighlight(buffer *ui.Buffer) {
return return
} }
m.printAllDirectionsArrowSign(buffer, -2) m.printAllDirectionsArrowSign(buffer, -1)
arrowsTextPoint := util.GetMiddlePoint(m.Block.Rectangle, arrowsText, 2)
if arrowsTextPoint.Y+1 < m.Inner.Max.Y {
buffer.SetString(
arrowsText,
ui.NewStyle(console.ColorDarkGrey),
arrowsTextPoint,
)
}
optionsTextPoint := util.GetMiddlePoint(m.Block.Rectangle, optionsText, 3) optionsTextPoint := util.GetMiddlePoint(m.Block.Rectangle, optionsText, 3)
if optionsTextPoint.Y+1 < m.Inner.Max.Y { if optionsTextPoint.Y+1 < m.Inner.Max.Y {