Use the underline style to display a cursor
This commit is contained in:
parent
b929ebe1a0
commit
4395e5d563
@ -108,8 +108,12 @@ func (input *Input) Draw (buffer stone.Buffer) {
|
||||
character := input.charAtSafe(index + scroll)
|
||||
|
||||
if input.Selected() && index == input.cursor {
|
||||
buffer.SetRune(x, input.Y, '_')
|
||||
} else if input.Obscure && character > 0 {
|
||||
buffer.SetStyle(x, input.Y, stone.StyleUnderline)
|
||||
} else {
|
||||
buffer.SetStyle(x, input.Y, stone.StyleNormal)
|
||||
}
|
||||
|
||||
if input.Obscure && character > 0 {
|
||||
buffer.SetRune(x, input.Y, '*')
|
||||
} else {
|
||||
buffer.SetRune(x, input.Y, character)
|
||||
|
Loading…
Reference in New Issue
Block a user