centerprint

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigFont

func BigFont() *font.Face

func Draw

func Draw(screen *ebiten.Image)

func NormalFont

func NormalFont() *font.Face

func Reset

func Reset()

func Update

func Update()

Types

type Centerprint

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

func New

func New(txt string, imp Importance, pos InitialPosition, face *font.Face, fgColor color.Color, fadeTime time.Duration) *Centerprint

func NewWithBG added in v1.5.6

func NewWithBG(txt string, imp Importance, pos InitialPosition, face *font.Face, bgColor, fgColor color.Color, fadeTime time.Duration) *Centerprint

func (*Centerprint) Active

func (cp *Centerprint) Active() bool

func (*Centerprint) SetFadeOut

func (cp *Centerprint) SetFadeOut(fadeOut bool)

type Importance

type Importance int
const (
	Important Importance = iota
	NotImportant
)

func (Importance) MarshalText added in v1.5.6

func (i Importance) MarshalText() ([]byte, error)

func (*Importance) UnmarshalText added in v1.5.6

func (i *Importance) UnmarshalText(text []byte) error

type InitialPosition

type InitialPosition int
const (
	Top InitialPosition = iota
	Middle
)

func (InitialPosition) MarshalText added in v1.5.6

func (i InitialPosition) MarshalText() ([]byte, error)

func (*InitialPosition) UnmarshalText added in v1.5.6

func (i *InitialPosition) UnmarshalText(text []byte) error

Jump to

Keyboard shortcuts

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