mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
ebiten: rename ebitenKey -> ebitengineKey
This commit is contained in:
parent
cdbe83177e
commit
4395d91c6b
34
genkeys.go
34
genkeys.go
@ -462,7 +462,7 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const ebitenKeysTmpl = `{{.License}}
|
const ebitengineKeysTmpl = `{{.License}}
|
||||||
|
|
||||||
{{.DoNotEdit}}
|
{{.DoNotEdit}}
|
||||||
|
|
||||||
@ -767,27 +767,27 @@ func main() {
|
|||||||
// Follow the standard comment rule (https://golang.org/s/generatedcode).
|
// Follow the standard comment rule (https://golang.org/s/generatedcode).
|
||||||
doNotEdit := "// Code generated by genkeys.go using 'go generate'. DO NOT EDIT."
|
doNotEdit := "// Code generated by genkeys.go using 'go generate'. DO NOT EDIT."
|
||||||
|
|
||||||
ebitenKeyNames := []string{}
|
ebitengineKeyNames := []string{}
|
||||||
ebitenKeyNamesWithoutOld := []string{}
|
ebitengineKeyNamesWithoutOld := []string{}
|
||||||
ebitenKeyNamesWithoutMods := []string{}
|
ebitengineKeyNamesWithoutMods := []string{}
|
||||||
uiKeyNames := []string{}
|
uiKeyNames := []string{}
|
||||||
|
|
||||||
for name := range uiKeyNameToJSKey {
|
for name := range uiKeyNameToJSKey {
|
||||||
uiKeyNames = append(uiKeyNames, name)
|
uiKeyNames = append(uiKeyNames, name)
|
||||||
ebitenKeyNames = append(ebitenKeyNames, name)
|
ebitengineKeyNames = append(ebitengineKeyNames, name)
|
||||||
ebitenKeyNamesWithoutOld = append(ebitenKeyNamesWithoutOld, name)
|
ebitengineKeyNamesWithoutOld = append(ebitengineKeyNamesWithoutOld, name)
|
||||||
ebitenKeyNamesWithoutMods = append(ebitenKeyNamesWithoutMods, name)
|
ebitengineKeyNamesWithoutMods = append(ebitengineKeyNamesWithoutMods, name)
|
||||||
}
|
}
|
||||||
for old := range oldEbitengineKeyNameToUIKeyName {
|
for old := range oldEbitengineKeyNameToUIKeyName {
|
||||||
ebitenKeyNames = append(ebitenKeyNames, old)
|
ebitengineKeyNames = append(ebitengineKeyNames, old)
|
||||||
}
|
}
|
||||||
// Keys for modifiers
|
// Keys for modifiers
|
||||||
ebitenKeyNames = append(ebitenKeyNames, "Alt", "Control", "Shift", "Meta")
|
ebitengineKeyNames = append(ebitengineKeyNames, "Alt", "Control", "Shift", "Meta")
|
||||||
ebitenKeyNamesWithoutOld = append(ebitenKeyNamesWithoutOld, "Alt", "Control", "Shift", "Meta")
|
ebitengineKeyNamesWithoutOld = append(ebitengineKeyNamesWithoutOld, "Alt", "Control", "Shift", "Meta")
|
||||||
|
|
||||||
sort.Slice(ebitenKeyNames, keyNamesLess(ebitenKeyNames))
|
sort.Slice(ebitengineKeyNames, keyNamesLess(ebitengineKeyNames))
|
||||||
sort.Slice(ebitenKeyNamesWithoutOld, keyNamesLess(ebitenKeyNamesWithoutOld))
|
sort.Slice(ebitengineKeyNamesWithoutOld, keyNamesLess(ebitengineKeyNamesWithoutOld))
|
||||||
sort.Slice(ebitenKeyNamesWithoutMods, keyNamesLess(ebitenKeyNamesWithoutMods))
|
sort.Slice(ebitengineKeyNamesWithoutMods, keyNamesLess(ebitengineKeyNamesWithoutMods))
|
||||||
sort.Slice(uiKeyNames, keyNamesLess(uiKeyNames))
|
sort.Slice(uiKeyNames, keyNamesLess(uiKeyNames))
|
||||||
|
|
||||||
// TODO: Add this line for event package (#926).
|
// TODO: Add this line for event package (#926).
|
||||||
@ -800,7 +800,7 @@ func main() {
|
|||||||
filepath.Join("internal", "ui", "keys_glfw.go"): uiGLFWKeysTmpl,
|
filepath.Join("internal", "ui", "keys_glfw.go"): uiGLFWKeysTmpl,
|
||||||
filepath.Join("internal", "ui", "keys_mobile.go"): uiMobileKeysTmpl,
|
filepath.Join("internal", "ui", "keys_mobile.go"): uiMobileKeysTmpl,
|
||||||
filepath.Join("internal", "ui", "keys_js.go"): uiJSKeysTmpl,
|
filepath.Join("internal", "ui", "keys_js.go"): uiJSKeysTmpl,
|
||||||
filepath.Join("keys.go"): ebitenKeysTmpl,
|
filepath.Join("keys.go"): ebitengineKeysTmpl,
|
||||||
filepath.Join("mobile", "ebitenmobileview", "keys_android.go"): mobileAndroidKeysTmpl,
|
filepath.Join("mobile", "ebitenmobileview", "keys_android.go"): mobileAndroidKeysTmpl,
|
||||||
} {
|
} {
|
||||||
f, err := os.Create(path)
|
f, err := os.Create(path)
|
||||||
@ -854,9 +854,9 @@ func main() {
|
|||||||
BuildTag: buildTag,
|
BuildTag: buildTag,
|
||||||
UIKeyNameToJSKey: uiKeyNameToJSKey,
|
UIKeyNameToJSKey: uiKeyNameToJSKey,
|
||||||
EdgeKeyCodeToName: edgeKeyCodeToName,
|
EdgeKeyCodeToName: edgeKeyCodeToName,
|
||||||
EbitengineKeyNames: ebitenKeyNames,
|
EbitengineKeyNames: ebitengineKeyNames,
|
||||||
EbitengineKeyNamesWithoutOld: ebitenKeyNamesWithoutOld,
|
EbitengineKeyNamesWithoutOld: ebitengineKeyNamesWithoutOld,
|
||||||
EbitengineKeyNamesWithoutMods: ebitenKeyNamesWithoutMods,
|
EbitengineKeyNamesWithoutMods: ebitengineKeyNamesWithoutMods,
|
||||||
GLFWKeyNameToGLFWKey: glfwKeyNameToGLFWKey,
|
GLFWKeyNameToGLFWKey: glfwKeyNameToGLFWKey,
|
||||||
UIKeyNames: uiKeyNames,
|
UIKeyNames: uiKeyNames,
|
||||||
UIKeyNameToGLFWKeyName: uiKeyNameToGLFWKeyName,
|
UIKeyNameToGLFWKeyName: uiKeyNameToGLFWKeyName,
|
||||||
|
Loading…
Reference in New Issue
Block a user