Added table patterns
This commit is contained in:
parent
bc72333ff0
commit
7521808872
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.7 KiB |
@ -16,7 +16,7 @@ import "git.tebibyte.media/sashakoshka/tomo/artist/patterns"
|
||||
//go:embed assets/wintergreen.png
|
||||
var defaultAtlasBytes []byte
|
||||
var defaultAtlas canvas.Canvas
|
||||
var defaultTextures [14][9]artist.Pattern
|
||||
var defaultTextures [16][9]artist.Pattern
|
||||
//go:embed assets/wintergreen-icons-small.png
|
||||
var defaultIconsSmallAtlasBytes []byte
|
||||
var defaultIconsSmall [640]binaryIcon
|
||||
@ -107,6 +107,10 @@ func init () {
|
||||
atlasCol(8, artist.Inset { 1, 1, 1, 1 })
|
||||
// PatternMercury
|
||||
atlasCol(13, artist.Inset { 2, 2, 2, 2 })
|
||||
// PatternTableHead:
|
||||
atlasCol(14, artist.Inset { 4, 4, 4, 4 })
|
||||
// PatternTableCell:
|
||||
atlasCol(15, artist.Inset { 4, 4, 4, 4 })
|
||||
|
||||
// PatternButton: basic.checkbox
|
||||
atlasCol(9, artist.Inset { 3, 3, 3, 3 })
|
||||
@ -227,11 +231,13 @@ func (Default) Pattern (id tomo.Pattern, state tomo.State, c tomo.Case) artist.P
|
||||
default:
|
||||
return defaultTextures[4][offset]
|
||||
}
|
||||
case tomo.PatternInput: return defaultTextures[5][offset]
|
||||
case tomo.PatternGutter: return defaultTextures[6][offset]
|
||||
case tomo.PatternHandle: return defaultTextures[7][offset]
|
||||
case tomo.PatternLine: return defaultTextures[8][offset]
|
||||
case tomo.PatternMercury: return defaultTextures[13][offset]
|
||||
case tomo.PatternInput: return defaultTextures[5][offset]
|
||||
case tomo.PatternGutter: return defaultTextures[6][offset]
|
||||
case tomo.PatternHandle: return defaultTextures[7][offset]
|
||||
case tomo.PatternLine: return defaultTextures[8][offset]
|
||||
case tomo.PatternMercury: return defaultTextures[13][offset]
|
||||
case tomo.PatternTableHead: return defaultTextures[14][offset]
|
||||
case tomo.PatternTableCell: return defaultTextures[15][offset]
|
||||
default: return patterns.Uhex(0xFF00FFFF)
|
||||
}
|
||||
}
|
||||
|
6
theme.go
6
theme.go
@ -73,6 +73,12 @@ type Pattern int; const (
|
||||
|
||||
// PatternMercury is a fill pattern for progress bars, meters, etc.
|
||||
PatternMercury
|
||||
|
||||
// PatternTableHead is a table row or column heading background.
|
||||
PatternTableHead
|
||||
|
||||
// PatternTableCell is a table cell background.
|
||||
PatternTableCell
|
||||
)
|
||||
|
||||
// IconSize is a type representing valid icon sizes.
|
||||
|
Reference in New Issue
Block a user