ui: Don't use currentUI directly

This commit is contained in:
Hajime Hoshi 2016-03-26 15:16:16 +09:00
parent f58a253631
commit 4a60343fe6
2 changed files with 3 additions and 3 deletions

View File

@ -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 {

View File

@ -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)
} }