mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/uidriver/mobile: add build tags
This commit is contained in:
parent
12a70952a9
commit
67bb58849e
@ -651,7 +651,7 @@ var androidKeyToDriverKey = map[int]driver.Key{
|
||||
}
|
||||
`
|
||||
|
||||
const mobileGBuildKeysTmpl = `{{.License}}
|
||||
const uidriverMobileKeysTmpl = `{{.License}}
|
||||
|
||||
{{.DoNotEdit}}
|
||||
|
||||
@ -791,7 +791,7 @@ func main() {
|
||||
filepath.Join("internal", "driver", "keys.go"): driverKeysTmpl,
|
||||
filepath.Join("internal", "glfw", "keys.go"): glfwKeysTmpl,
|
||||
filepath.Join("internal", "uidriver", "glfw", "keys.go"): uidriverGlfwKeysTmpl,
|
||||
filepath.Join("internal", "uidriver", "mobile", "keys.go"): mobileGBuildKeysTmpl,
|
||||
filepath.Join("internal", "uidriver", "mobile", "keys.go"): uidriverMobileKeysTmpl,
|
||||
filepath.Join("internal", "uidriver", "js", "keys_js.go"): uidriverJsKeysTmpl,
|
||||
filepath.Join("keys.go"): ebitenKeysTmpl,
|
||||
filepath.Join("mobile", "ebitenmobileview", "keys_android.go"): mobileAndroidKeysTmpl,
|
||||
@ -817,6 +817,9 @@ func main() {
|
||||
case filepath.Join("internal", "glfw", "keys.go"):
|
||||
buildTag = "//go:build !js" +
|
||||
"\n// +build !js"
|
||||
case filepath.Join("internal", "uidriver", "mobile", "keys.go"):
|
||||
buildTag = "//go:build android || ios" +
|
||||
"\n// +build android ios"
|
||||
case filepath.Join("internal", "uidriver", "glfw", "keys.go"):
|
||||
buildTag = "//go:build !android && !js && !ios" +
|
||||
"\n// +build !android,!js,!ios"
|
||||
|
@ -14,6 +14,9 @@
|
||||
|
||||
// Code generated by genkeys.go using 'go generate'. DO NOT EDIT.
|
||||
|
||||
//go:build android || ios
|
||||
// +build android ios
|
||||
|
||||
package mobile
|
||||
|
||||
import (
|
||||
|
2
keys.go
2
keys.go
@ -23,7 +23,7 @@ import (
|
||||
)
|
||||
|
||||
// A Key represents a keyboard key.
|
||||
// These keys represent pysical keys of US keyboard layout.
|
||||
// These keys represent pysical keys of US keyboard.
|
||||
// For example, KeyQ represents Q key on US keyboards and ' (quote) key on Dvorak keyboards.
|
||||
type Key int
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user