mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
ui: Don't use currentUI directly
This commit is contained in:
parent
f58a253631
commit
4a60343fe6
@ -86,11 +86,11 @@ func Init() *opengl.Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) SetScreenSize(width, height int) bool {
|
func (u *UserInterface) SetScreenSize(width, height int) bool {
|
||||||
return u.setScreenSize(width, height, currentUI.scale)
|
return u.setScreenSize(width, height, u.scale)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) SetScreenScale(scale int) bool {
|
func (u *UserInterface) SetScreenScale(scale int) bool {
|
||||||
return u.setScreenSize(currentUI.width, currentUI.height, scale)
|
return u.setScreenSize(u.width, u.height, scale)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) ScreenScale() int {
|
func (u *UserInterface) ScreenScale() int {
|
||||||
|
@ -34,7 +34,7 @@ func (u *UserInterface) SetScreenSize(width, height int) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) SetScreenScale(scale int) bool {
|
func (u *UserInterface) SetScreenScale(scale int) bool {
|
||||||
width, height := currentUI.size()
|
width, height := u.size()
|
||||||
return u.setScreenSize(width, height, scale)
|
return u.setScreenSize(width, height, scale)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user