mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
0e19aa558a
commit
9efccea31c
@ -311,6 +311,16 @@ func IsRunnableInBackground() bool {
|
|||||||
return currentUI.isRunnableInBackground()
|
return currentUI.isRunnableInBackground()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetWindowTitle(title string) {
|
||||||
|
if !currentUI.isRunning() {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_ = currentUI.runOnMainThread(func() error {
|
||||||
|
currentUI.window.SetTitle(title)
|
||||||
|
return nil
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
func SetWindowIcon(iconImages []image.Image) {
|
func SetWindowIcon(iconImages []image.Image) {
|
||||||
if !currentUI.isRunning() {
|
if !currentUI.isRunning() {
|
||||||
currentUI.setInitIconImages(iconImages)
|
currentUI.setInitIconImages(iconImages)
|
||||||
|
@ -112,6 +112,11 @@ func SetCursorVisible(visible bool) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetWindowTitle(title string) {
|
||||||
|
doc := js.Global.Get("document")
|
||||||
|
doc.Set("title", title)
|
||||||
|
}
|
||||||
|
|
||||||
func SetWindowIcon(iconImages []image.Image) {
|
func SetWindowIcon(iconImages []image.Image) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
@ -360,6 +360,10 @@ func SetRunnableInBackground(runnableInBackground bool) {
|
|||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func SetWindowTitle(title string) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
||||||
|
|
||||||
func SetWindowIcon(iconImages []image.Image) {
|
func SetWindowIcon(iconImages []image.Image) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
9
run.go
9
run.go
@ -428,6 +428,15 @@ func SetRunnableInBackground(runnableInBackground bool) {
|
|||||||
ui.SetRunnableInBackground(runnableInBackground)
|
ui.SetRunnableInBackground(runnableInBackground)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetWindowTitle sets the title of the window.
|
||||||
|
//
|
||||||
|
// SetWindowTitle does nothing on mobiles.
|
||||||
|
//
|
||||||
|
// SetWindowTitle is concurrent-safe.
|
||||||
|
func SetWindowTitle(title string) {
|
||||||
|
ui.SetWindowTitle(title)
|
||||||
|
}
|
||||||
|
|
||||||
// SetWindowIcon sets the icon of the game window.
|
// SetWindowIcon sets the icon of the game window.
|
||||||
//
|
//
|
||||||
// If len(iconImages) is 0, SetWindowIcon reverts the icon to the default one.
|
// If len(iconImages) is 0, SetWindowIcon reverts the icon to the default one.
|
||||||
|
Loading…
Reference in New Issue
Block a user