diff --git a/examples/windowsize/main.go b/examples/windowsize/main.go index afd7a783b..c3ad33fad 100644 --- a/examples/windowsize/main.go +++ b/examples/windowsize/main.go @@ -96,7 +96,7 @@ type game struct { } func (g *game) Layout(outsideWidth, outsideHeight int) (int, int) { - // As game implements the interface FloatLayouter, Layout is never called and LayoutF is called instead. + // As game implements the interface LayoutFer, Layout is never called and LayoutF is called instead. // However, game has to implement Layout to satisfy the interface Game. panic("windowsize: Layout must not be called") } diff --git a/gameforui.go b/gameforui.go index ddf416fbf..48431b204 100644 --- a/gameforui.go +++ b/gameforui.go @@ -126,7 +126,7 @@ func (g *gameForUI) NewScreenImage(width, height int) *ui.Image { } func (g *gameForUI) Layout(outsideWidth, outsideHeight float64) (float64, float64) { - if l, ok := g.game.(FloatLayouter); ok { + if l, ok := g.game.(LayoutFer); ok { return l.LayoutF(outsideWidth, outsideHeight) } diff --git a/run.go b/run.go index 1f1468a47..03aba9eaf 100644 --- a/run.go +++ b/run.go @@ -80,12 +80,12 @@ type Game interface { // You can return a fixed screen size if you don't care, or you can also return a calculated screen size // adjusted with the given outside size. // - // If the game implements the interface FloatLayouter, Layout is never called and LayoutF is called instead. + // If the game implements the interface LayoutFer, Layout is never called and LayoutF is called instead. Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) } -// FloatLayouter is an interface for the float version of Game.Layout. -type FloatLayouter interface { +// LayoutFer is an interface for the float version of Game.Layout. +type LayoutFer interface { // LayoutF is the float version of Game.Layout. // // If the game implements this interface, Layout is never called and LayoutF is called instead.