Very basic text input

This commit is contained in:
2023-01-18 00:38:58 -05:00
parent 1fee6ab9e6
commit 85ddb8ace1
4 changed files with 324 additions and 11 deletions

33
theme/input.go Normal file
View File

@@ -0,0 +1,33 @@
package theme
import "git.tebibyte.media/sashakoshka/tomo/artist"
var inputPattern = artist.NewMultiBorder (
artist.Border { Weight: 1, Stroke: strokePattern },
artist.Border {
Weight: 1,
Stroke: artist.Chiseled {
Highlight: artist.NewUniform(hex(0x89925AFF)),
Shadow: artist.NewUniform(hex(0xD2CB9AFF)),
},
},
artist.Border { Stroke: artist.NewUniform(hex(0xD2CB9AFF)) })
var selectedInputPattern = artist.NewMultiBorder (
artist.Border { Weight: 1, Stroke: strokePattern },
artist.Border { Weight: 1, Stroke: accentPattern },
artist.Border { Stroke: artist.NewUniform(hex(0xD2CB9AFF)) })
var disabledInputPattern = artist.NewMultiBorder (
artist.Border { Weight: 1, Stroke: weakForegroundPattern },
artist.Border { Stroke: backgroundPattern })
func InputPattern (enabled, selected bool) (artist.Pattern) {
if enabled {
if selected {
return selectedInputPattern
} else {
return inputPattern
}
} else {
return disabledInputPattern
}
}