diff --git a/internal/uidriver/mobile/ui.go b/internal/uidriver/mobile/ui.go index d1fb06c94..6a6c81c93 100644 --- a/internal/uidriver/mobile/ui.go +++ b/internal/uidriver/mobile/ui.go @@ -58,6 +58,7 @@ func Get() *UserInterface { return theUI } +// Update is called from mobile/ebitenmobileview. func (u *UserInterface) Update() { u.m.Lock() fg := u.foreground @@ -332,6 +333,7 @@ func (u *UserInterface) ScreenSizeInFullscreen() (int, int) { return 0, 0 } +// SetScreenSizeAndScale is called from mobile/ebitenmobileview. func (u *UserInterface) SetScreenSizeAndScale(width, height int, scale float64) { // Called from ebitenmobileview. u.m.Lock() diff --git a/mobile/ebitenmobileview/funcs.go b/mobile/ebitenmobileview/funcs.go index d1d9efb19..27fd402ab 100644 --- a/mobile/ebitenmobileview/funcs.go +++ b/mobile/ebitenmobileview/funcs.go @@ -47,6 +47,7 @@ func layout(viewWidth, viewHeight int, viewRectSetter ViewRectSetter) { return } + // TODO: Layout must be called every frame like uiContext already did. w, h := theState.game.Layout(int(viewWidth), int(viewHeight)) scaleX := float64(viewWidth) / float64(w) scaleY := float64(viewHeight) / float64(h)