All icons now return textures
This commit is contained in:
parent
3614979e35
commit
50697e4369
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue