mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
uidriver/mobile: Add comments
This commit is contained in:
parent
024fc48647
commit
a303487328
@ -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()
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user