Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { Notifications []*Notification // contains filtered or unexported fields }
func NewManager ¶
func NewManager() *Manager
func (*Manager) AddNotification ¶
func (m *Manager) AddNotification(announcement *models.Announcement)
func (*Manager) RenderLoop ¶
RenderLoop loops through our current notifications to see if there are any which we should call rendering methods on.
func (*Manager) UpdateAttributes ¶
func (m *Manager) UpdateAttributes(settings *models.PresentationSettings, cluster *models.ScreenCluster, screen *models.Screen)
UpdateAttributes is used to update the attributes needed during rendering. TODO: We should come up with a better way to do this.
type Notification ¶
type Notification struct { HasCompleted bool // contains filtered or unexported fields }
func (*Notification) Render ¶
func (n *Notification) Render(ctx *nanovgo.Context)
Render actually renders the notification to the GUI context. `ShouldRender` should be run before this to ensure the rendering method should be called on this notification.
func (*Notification) ShouldRender ¶
func (n *Notification) ShouldRender() bool
ShouldRender checks to see if this notification should be rendered. If it's past the given lifespan then we set it to completed, so we can garbage collect it.
Click to show internal directories.
Click to hide internal directories.