mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 02:38:53 +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)
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
@ -167,7 +167,9 @@ func outputKeyboardImage() (map[string]image.Rectangle, error) {
|
||||
|
||||
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
|
||||
|
||||
@ -191,7 +193,7 @@ func outputKeyRectsGo(k map[string]image.Rectangle) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
path := "keyboard/keyboard/keyrects.go"
|
||||
path := "keyrects.go"
|
||||
|
||||
f, err := os.Create(path)
|
||||
if err != nil {
|
||||
|
@ -12,7 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// 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 .
|
||||
|
||||
package example
|
||||
package keyboard
|
@ -12,7 +12,9 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user