mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-13 20:42:07 +01:00
uidriver/mobile: Add comments
This commit is contained in:
parent
024fc48647
commit
a303487328
@ -58,6 +58,7 @@ func Get() *UserInterface {
|
|||||||
return theUI
|
return theUI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update is called from mobile/ebitenmobileview.
|
||||||
func (u *UserInterface) Update() {
|
func (u *UserInterface) Update() {
|
||||||
u.m.Lock()
|
u.m.Lock()
|
||||||
fg := u.foreground
|
fg := u.foreground
|
||||||
@ -332,6 +333,7 @@ func (u *UserInterface) ScreenSizeInFullscreen() (int, int) {
|
|||||||
return 0, 0
|
return 0, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetScreenSizeAndScale is called from mobile/ebitenmobileview.
|
||||||
func (u *UserInterface) SetScreenSizeAndScale(width, height int, scale float64) {
|
func (u *UserInterface) SetScreenSizeAndScale(width, height int, scale float64) {
|
||||||
// Called from ebitenmobileview.
|
// Called from ebitenmobileview.
|
||||||
u.m.Lock()
|
u.m.Lock()
|
||||||
|
@ -47,6 +47,7 @@ func layout(viewWidth, viewHeight int, viewRectSetter ViewRectSetter) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Layout must be called every frame like uiContext already did.
|
||||||
w, h := theState.game.Layout(int(viewWidth), int(viewHeight))
|
w, h := theState.game.Layout(int(viewWidth), int(viewHeight))
|
||||||
scaleX := float64(viewWidth) / float64(w)
|
scaleX := float64(viewWidth) / float64(w)
|
||||||
scaleY := float64(viewHeight) / float64(h)
|
scaleY := float64(viewHeight) / float64(h)
|
||||||
|
Loading…
Reference in New Issue
Block a user