From 0898906dfb6c439ad2f4e443f05d2701a7ab1233 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 20 Sep 2023 22:24:53 +0900 Subject: [PATCH] examples/textinput: add a log message about environments Updates #2735 Updates #2736 --- examples/textinput/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/textinput/main.go b/examples/textinput/main.go index 1c7f70371..923d92271 100644 --- a/examples/textinput/main.go +++ b/examples/textinput/main.go @@ -19,6 +19,7 @@ import ( "image/color" "log" "math" + "runtime" "strings" "unicode/utf8" @@ -352,6 +353,10 @@ func (g *Game) Layout(outsideWidth, outsideHeight int) (int, int) { } func main() { + if runtime.GOOS != "darwin" && runtime.GOOS != "js" { + log.Printf("github.com/hajimehoshi/ebiten/v2/exp/textinput is not supported in this environment (GOOS=%s) yet", runtime.GOOS) + } + ebiten.SetWindowSize(screenWidth, screenHeight) ebiten.SetWindowTitle("Text Input (Ebitengine Demo)") if err := ebiten.RunGame(&Game{}); err != nil {