label

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MPlus1mMedium []byte
View Source
var MPlus1mMediumFont *truetype.Font

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) error

SetBgColor sets the background color of the Label.

func (*Label) SetText

func (l *Label) SetText(text string) error

SetText sets the text of the Label.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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