Skip to content

Commit

Permalink
Remove unused function drawBox
Browse files Browse the repository at this point in the history
  • Loading branch information
slarwise committed Aug 6, 2024
1 parent 2087816 commit 92ed3e5
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,28 +304,6 @@ func drawLine(s tcell.Screen, x, y int, style tcell.Style, text string) {
}
}

func drawBox(s tcell.Screen, x, y, width, height int) {
// __________
// | |
// | |
// ----------
// str := "-"
// s.SetContent(0, 1, rune(str[0]), nil, tcell.StyleDefault)
top := rune("0"[0])
for xc := x + 1; xc < width+x-1; xc++ {
s.SetContent(xc, y, top, nil, tcell.StyleDefault)
}
side := rune("|"[0])
for yc := y + 1; yc < height-1; yc++ {
s.SetContent(x, yc, side, nil, tcell.StyleDefault)
s.SetContent(x+width-1, yc, side, nil, tcell.StyleDefault)
}
bottom := top
for xc := x + 1; xc < width+x-1; xc++ {
s.SetContent(xc, height-1, bottom, nil, tcell.StyleDefault)
}
}

// TODO: Handle going out of bounds
func drawKeys(s tcell.Screen, width, height int, keys []string, selectedIndex int) {
keys = keys[:min(height-2, len(keys))]
Expand Down

0 comments on commit 92ed3e5

Please sign in to comment.