label

package
v0.0.0-...-1a7d465 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BgColor

func BgColor(c color.Color) func(*Label)

BgColor is a functional option which sets the background color of the label.

func Callback

func Callback(cb func(int, sd.BtnState)) func(*Label)

func Text

func Text(text string) func(*Label)

Text is a functional option for providing the initial text on the label. Max 5 characters.

func TextColor

func TextColor(c color.Color) func(*Label)

TextColor is a functional option which sets the text color.

Types

type Label

type Label struct {
	// contains filtered or unexported fields
}

Label is a basic Element for the StreamDeck.

func NewLabel

func NewLabel(sd *sd.StreamDeck, btnIndex int, options ...func(*Label)) (*Label, error)

NewLabel is the constructor method for a Label.

func (*Label) Change

func (l *Label) Change(state sd.BtnState)

func (*Label) Draw

func (l *Label) Draw() error

Draw renders the Label on the designated Button.

func (*Label) SetBgColor

func (l *Label) SetBgColor(color *image.Uniform)

SetBgColor sets the background color of the Label.

func (*Label) SetText

func (l *Label) SetText(text string)

SetText sets the text of the Label.

func (*Label) SetTextColor

func (l *Label) SetTextColor(c color.Color)

SetTextColor sets the color of the Label's text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL