All icons now return textures

This commit is contained in:
Sasha Koshka 2023-08-20 18:41:46 -04:00
parent 3614979e35
commit 50697e4369
1 changed files with 8 additions and 2 deletions

View File

@ -226,8 +226,8 @@ type Icon int; const (
IconVolume3
)
// Icon returns a texture of the corresponding icon ID.
func (id Icon) Image (size IconSize) tomo.Texture {
// Texture returns a texture of the corresponding icon ID.
func (id Icon) Texture (size IconSize) tomo.Texture {
if current == nil { return nil }
return current.Icon(id, size)
}
@ -250,6 +250,12 @@ type ApplicationIcon struct {
Role ApplicationRole
}
// Texture returns a texture of the corresponding icon ID.
func (icon ApplicationIcon) Texture (size IconSize) tomo.Texture {
if current == nil { return nil }
return current.ApplicationIcon(icon, size)
}
// ApplicationRole describes what an application does.
type ApplicationRole int; const (
RoleUnknown ApplicationRole = iota