diff --git a/draw.go b/draw.go index e51343a..2b943ba 100644 --- a/draw.go +++ b/draw.go @@ -60,8 +60,10 @@ func drawInput () { if character == '_' { application.SetColor(x + xOffset, y, stone.ColorDim) + application.SetStyle(x + xOffset, y, stone.StyleNormal) } else { application.SetColor(x + xOffset, y, cell.Color()) + application.SetStyle(x + xOffset, y, cell.Style()) } } } diff --git a/go.mod b/go.mod index 2c4c704..8489575 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module git.tebibyte.media/sashakoshka/mathpan go 1.19 -require git.tebibyte.media/sashakoshka/stone v0.2.1 +require git.tebibyte.media/sashakoshka/stone v0.5.1 require ( github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298 // indirect diff --git a/go.sum b/go.sum index 9f44c83..3271d8d 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -git.tebibyte.media/sashakoshka/stone v0.2.1 h1:qUvuYpl0yN2bY50vXazvH2s6EMvk8IFgvr8QiiA8xvc= -git.tebibyte.media/sashakoshka/stone v0.2.1/go.mod h1:ISnqmX6xvItOot3eW3YWLcNFeJrGpKetQGQniAjnU2A= +git.tebibyte.media/sashakoshka/stone v0.5.1 h1:QQo1lccq6bMebXRKlbAoFBKSDbVwvSkXriKHMGvfAkk= +git.tebibyte.media/sashakoshka/stone v0.5.1/go.mod h1:ISnqmX6xvItOot3eW3YWLcNFeJrGpKetQGQniAjnU2A= github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298 h1:1qlsVAQJXZHsaM8b6OLVo6muQUQd4CwkH/D3fnnbHXA= github.com/BurntSushi/freetype-go v0.0.0-20160129220410-b763ddbfe298/go.mod h1:D+QujdIlUNfa0igpNMk6UIvlb6C252URs4yupRUV4lQ= github.com/BurntSushi/graphics-go v0.0.0-20160129215708-b43f31a4a966 h1:lTG4HQym5oPKjL7nGs+csTgiDna685ZXjxijkne828g= diff --git a/keyboard.xcf b/keyboard.xcf index d228a42..ab9d71f 100644 Binary files a/keyboard.xcf and b/keyboard.xcf differ diff --git a/tree.go b/tree.go index b4745f3..806b657 100644 --- a/tree.go +++ b/tree.go @@ -232,19 +232,22 @@ func (operation *Operation) Render (target stone.Buffer, offset int) (moved int) } if selectedExpression == operation { - target.SetColor(offset, 0, stone.ColorBlue) + target.SetColor(offset, 0, stone.ColorYellow) + target.SetStyle(offset, 0, stone.StyleHighlight) } else { target.SetColor(offset, 0, stone.ColorDim) + target.SetStyle(offset, 0, stone.StyleNormal) } moved ++ opcodeSymbol := operation.opcode.String() for _, character := range opcodeSymbol { target.SetRune(offset + moved, 0, character) + target.SetColor(offset + moved, 0, stone.ColorYellow) if selectedExpression == operation { - target.SetColor(offset + moved, 0, stone.ColorBlue) + target.SetStyle(offset + moved, 0, stone.StyleHighlight) } else { - target.SetColor(offset + moved, 0, stone.ColorYellow) + target.SetStyle(offset + moved, 0, stone.StyleNormal) } moved ++ } @@ -262,9 +265,11 @@ func (operation *Operation) Render (target stone.Buffer, offset int) (moved int) } if selectedExpression == operation { - target.SetColor(offset + moved, 0, stone.ColorBlue) + target.SetColor(offset + moved, 0, stone.ColorYellow) + target.SetStyle(offset + moved, 0, stone.StyleHighlight) } else { target.SetColor(offset + moved, 0, stone.ColorDim) + target.SetStyle(offset + moved, 0, stone.StyleNormal) } moved ++ return @@ -362,10 +367,11 @@ func (literal *IntegerLiteral) Render (target stone.Buffer, offset int) (moved i for _, character := range output { target.SetRune(offset + moved, 0, character) + target.SetColor(offset + moved, 0, stone.ColorPurple) if selectedExpression == literal { - target.SetColor(offset + moved, 0, stone.ColorBlue) + target.SetStyle(offset + moved, 0, stone.StyleHighlight) } else { - target.SetColor(offset + moved, 0, stone.ColorPurple) + target.SetStyle(offset + moved, 0, stone.StyleNormal) } moved ++ }