mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
examples/keyboard: Add example tags
This commit is contained in:
parent
237e84d0ea
commit
908d8aa9f2
@ -154,7 +154,7 @@ func outputKeyboardImage() (map[string]image.Rectangle, error) {
|
|||||||
palettedImg := image.NewPaletted(img.Bounds(), palette)
|
palettedImg := image.NewPaletted(img.Bounds(), palette)
|
||||||
draw.Draw(palettedImg, palettedImg.Bounds(), img, image.ZP, draw.Src)
|
draw.Draw(palettedImg, palettedImg.Bounds(), img, image.ZP, draw.Src)
|
||||||
|
|
||||||
f, err := os.Create("_resources/images/keyboard/keyboard.png")
|
f, err := os.Create("../../_resources/images/keyboard/keyboard.png")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -167,7 +167,9 @@ func outputKeyboardImage() (map[string]image.Rectangle, error) {
|
|||||||
|
|
||||||
const keyRectTmpl = `{{.License}}
|
const keyRectTmpl = `{{.License}}
|
||||||
|
|
||||||
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
// DO NOT EDIT: This file is auto-generated by gen.go.
|
||||||
|
|
||||||
|
// +build example
|
||||||
|
|
||||||
package keyboard
|
package keyboard
|
||||||
|
|
||||||
@ -191,7 +193,7 @@ func outputKeyRectsGo(k map[string]image.Rectangle) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
path := "keyboard/keyboard/keyrects.go"
|
path := "keyrects.go"
|
||||||
|
|
||||||
f, err := os.Create(path)
|
f, err := os.Create(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -12,7 +12,9 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
//go:generate go run keyboard/keyboard/gen.go
|
// +build example
|
||||||
|
|
||||||
|
//go:generate go run -tags=example gen.go
|
||||||
//go:generate gofmt -s -w .
|
//go:generate gofmt -s -w .
|
||||||
|
|
||||||
package example
|
package keyboard
|
@ -12,7 +12,9 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
// DO NOT EDIT: This file is auto-generated by genkeys.go.
|
// DO NOT EDIT: This file is auto-generated by gen.go.
|
||||||
|
|
||||||
|
// +build example
|
||||||
|
|
||||||
package keyboard
|
package keyboard
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user