Documentation ¶
Index ¶
- type Clock
- func (clk *Clock) Draw(screen *ebiten.Image)
- func (clk *Clock) Height() int
- func (clk *Clock) Layout(outsideWidth, outsideHeight int) (int, int)
- func (clk *Clock) LoadConfig()
- func (clk *Clock) ShouldRedraw(now time.Time) bool
- func (clk *Clock) Update() error
- func (clk *Clock) UpdateFontFace()
- func (clk *Clock) UpdateScreenSize()
- func (clk *Clock) UpdateTimeFormat()
- func (clk *Clock) Width() int
- type Config
- type Draggable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock is a clock that draws the time in the given font.
func (*Clock) Draw ¶
func (clk *Clock) Draw(screen *ebiten.Image)
Draw draws the clock on the screen.
func (*Clock) LoadConfig ¶
func (clk *Clock) LoadConfig()
func (*Clock) ShouldRedraw ¶
ShouldRedraw returns true if the clock should be redrawn.
func (*Clock) UpdateFontFace ¶
func (clk *Clock) UpdateFontFace()
func (*Clock) UpdateScreenSize ¶
func (clk *Clock) UpdateScreenSize()
func (*Clock) UpdateTimeFormat ¶
func (clk *Clock) UpdateTimeFormat()
type Config ¶
type Config struct { Seconds bool Timezone bool UTC bool Hours24 bool FontSize float64 FontColor color.RGBA Background color.RGBA }
Config is the configuration for Clock.
func NewConfigFromFile ¶
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a new Config with default values.
func (*Config) WriteConfigToFile ¶
Click to show internal directories.
Click to hide internal directories.