Documentation
¶
Index ¶
- type Slide
- type SlideshowGame
- func (g *SlideshowGame) Draw(screen *ebiten.Image)
- func (g *SlideshowGame) Layout(outsideWidth, outsideHeight int) (int, int)
- func (g *SlideshowGame) LoadCurrentSlide() error
- func (g *SlideshowGame) SetLoadingError(err error)
- func (g *SlideshowGame) SetRemoteCommandChan(ch chan cec.RemoteCommand)
- func (g *SlideshowGame) Update() error
- type TiledImage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Slide ¶
Slide holds up to two photos to be displayed side-by-side if both are portrait.
func BuildSlidesFromPhotos ¶
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).