slideshow

package
v0.0.0-...-d335ae2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Slide

type Slide struct {
	Photos []photo.Photo // either 1 or 2 Photos
}

Slide holds up to two photos to be displayed side-by-side if both are portrait.

func BuildSlidesFromPhotos

func BuildSlidesFromPhotos(photos []photo.Photo) []Slide

BuildSlidesFromPhotos takes a set of photos and merges consecutive portraits into one Slide if side-by-side is desired.

type SlideshowGame

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

SlideshowGame holds the state of our slideshow, including the slides, indexes, etc.

func NewSlideshowGame

func NewSlideshowGame(
	slides []Slide,
	interval time.Duration,
	dateOverlay bool,
) *SlideshowGame

NewSlideshowGame creates a slideshow game struct.

func (*SlideshowGame) Draw

func (g *SlideshowGame) Draw(screen *ebiten.Image)

Draw is called every frame (~60fps). We render the current slide, plus any overlays.

func (*SlideshowGame) Layout

func (g *SlideshowGame) Layout(outsideWidth, outsideHeight int) (int, int)

Layout sets the logical screen size. Ebiten will scale to the actual display.

func (*SlideshowGame) LoadCurrentSlide

func (g *SlideshowGame) LoadCurrentSlide() error

LoadCurrentSlide loads the images for the current index's slide.

func (*SlideshowGame) SetLoadingError

func (g *SlideshowGame) SetLoadingError(err error)

For completeness, if you also want the "SetLoadingError" method:

func (*SlideshowGame) SetRemoteCommandChan

func (g *SlideshowGame) SetRemoteCommandChan(ch chan cec.RemoteCommand)

SetRemoteCommandChan allows us to inject the remote events channel.

func (*SlideshowGame) Update

func (g *SlideshowGame) Update() error

Update is called by Ebiten ~60 times/sec. We read remote commands, handle them, and also auto-advance slides if not paused.

type TiledImage

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

TiledImage holds one large image that may be split into multiple sub-images (tiles) if its dimensions exceed Ebiten’s max texture size (maxTileSize).

Jump to

Keyboard shortcuts

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