mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 11:48:55 +01:00
internal/uidriver/glfw: refactoring: remove initTitle
This commit is contained in:
parent
5ee2ff56ca
commit
220a8f48ac
@ -86,7 +86,6 @@ type UserInterface struct {
|
|||||||
initFullscreenWidthInDIP int
|
initFullscreenWidthInDIP int
|
||||||
initFullscreenHeightInDIP int
|
initFullscreenHeightInDIP int
|
||||||
|
|
||||||
initTitle string
|
|
||||||
initFullscreen bool
|
initFullscreen bool
|
||||||
initCursorMode driver.CursorMode
|
initCursorMode driver.CursorMode
|
||||||
initWindowDecorated bool
|
initWindowDecorated bool
|
||||||
@ -284,19 +283,6 @@ func (u *UserInterface) setWindowSizeLimitsInDIP(minw, minh, maxw, maxh int) boo
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *UserInterface) getInitTitle() string {
|
|
||||||
u.m.RLock()
|
|
||||||
v := u.initTitle
|
|
||||||
u.m.RUnlock()
|
|
||||||
return v
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserInterface) setInitTitle(title string) {
|
|
||||||
u.m.RLock()
|
|
||||||
u.initTitle = title
|
|
||||||
u.m.RUnlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (u *UserInterface) isInitFullscreen() bool {
|
func (u *UserInterface) isInitFullscreen() bool {
|
||||||
u.m.RLock()
|
u.m.RLock()
|
||||||
v := u.initFullscreen
|
v := u.initFullscreen
|
||||||
@ -927,7 +913,6 @@ func (u *UserInterface) init() error {
|
|||||||
u.window.Maximize()
|
u.window.Maximize()
|
||||||
}
|
}
|
||||||
|
|
||||||
u.title = u.getInitTitle()
|
|
||||||
u.window.SetTitle(u.title)
|
u.window.SetTitle(u.title)
|
||||||
u.window.Show()
|
u.window.Show()
|
||||||
|
|
||||||
|
@ -258,7 +258,9 @@ func (w *window) SetIcon(iconImages []image.Image) {
|
|||||||
|
|
||||||
func (w *window) SetTitle(title string) {
|
func (w *window) SetTitle(title string) {
|
||||||
if !w.ui.isRunning() {
|
if !w.ui.isRunning() {
|
||||||
w.ui.setInitTitle(title)
|
w.ui.m.Lock()
|
||||||
|
w.ui.title = title
|
||||||
|
w.ui.m.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
w.ui.title = title
|
w.ui.title = title
|
||||||
|
Loading…
Reference in New Issue
Block a user