ebiten/examples
Hajime Hoshi 49c3c30c79 ebiten: Add IsWindowBeingClosed / SetWindowClosingHandled / IsWindowClosingHandled
IsWindowBeingClosed reports whether the window is being closed by
the user.

SetWindowClosingHandled sets whether the window closing is handled
or not. If the state is true, the window is not closed immediately
by the user and the game can handle the closing state. In this case,
the Update function should return an error in order to end the game.

This change also adds examples/windowclosing.

Closes #1574
2021-06-14 02:29:11 +09:00
..
2048 examples: Use the new keys 2021-04-18 01:13:20 +09:00
additive Remove supporting jsgo 2020-10-07 00:46:07 +09:00
address Remove supporting jsgo 2020-10-07 00:46:07 +09:00
airship examples: Use the new keys 2021-04-18 01:13:20 +09:00
alphablending Remove supporting jsgo 2020-10-07 00:46:07 +09:00
animation Remove supporting jsgo 2020-10-07 00:46:07 +09:00
audio examples/audio: Add buttons 2021-05-04 02:02:17 +09:00
audioinfiniteloop examples: Update resolutions 2020-10-31 02:06:45 +09:00
audiopanning examples/audiopanning: Bug fix: Align the buffer size 2021-04-20 02:47:14 +09:00
blocks examples: Use the new keys 2021-04-18 01:13:20 +09:00
blur Remove supporting jsgo 2020-10-07 00:46:07 +09:00
camera examples: Use the new keys 2021-04-18 01:13:20 +09:00
chipmunk Remove supporting jsgo 2020-10-07 00:46:07 +09:00
clip ebiten: Allow rendering on a sub-image by scissor test 2020-11-08 00:58:44 +09:00
contextlost examples/contextlost: Enable to build on non-JS environments 2020-11-05 00:36:07 +09:00
cursor internal/uidriver/glfw: Native macOS implementation for setting cursor shape (#1624) 2021-05-02 14:50:50 +09:00
doomfire Remove supporting jsgo 2020-10-07 00:46:07 +09:00
drag examples: Update resolutions 2020-10-31 02:06:45 +09:00
filter Remove supporting jsgo 2020-10-07 00:46:07 +09:00
flappy examples/resources: Unify jab.wav to 48000 Hz 2021-05-25 22:32:50 +09:00
flood Remove supporting jsgo 2020-10-07 00:46:07 +09:00
font Remove supporting jsgo 2020-10-07 00:46:07 +09:00
fullscreen Remove supporting jsgo 2020-10-07 00:46:07 +09:00
gamepad ebiten: Introduce type GamepadID 2020-10-08 01:57:08 +09:00
highdpi Remove supporting jsgo 2020-10-07 00:46:07 +09:00
hsv examples/hsv, examples/hue: Use wider screens 2021-04-17 22:10:14 +09:00
hue examples/hsv, examples/hue: Use wider screens 2021-04-17 22:10:14 +09:00
infinitescroll Remove supporting jsgo 2020-10-07 00:46:07 +09:00
keyboard Add go:build comments with go1.17beta1 fmt 2021-06-11 01:11:46 +09:00
life Remove supporting jsgo 2020-10-07 00:46:07 +09:00
mandelbrot Remove supporting jsgo 2020-10-07 00:46:07 +09:00
mascot Remove supporting jsgo 2020-10-07 00:46:07 +09:00
masking Remove supporting jsgo 2020-10-07 00:46:07 +09:00
minify Remove supporting jsgo 2020-10-07 00:46:07 +09:00
moire Remove supporting jsgo 2020-10-07 00:46:07 +09:00
mosaic Remove supporting jsgo 2020-10-07 00:46:07 +09:00
noise Remove supporting jsgo 2020-10-07 00:46:07 +09:00
paint examples: Update resolutions 2020-10-31 02:06:45 +09:00
particles Remove supporting jsgo 2020-10-07 00:46:07 +09:00
pcm examples: Update resolutions 2020-10-31 02:06:45 +09:00
perspective examples: Update resolutions 2020-10-31 02:06:45 +09:00
piano Remove supporting jsgo 2020-10-07 00:46:07 +09:00
platformer examples: Use the new keys 2021-04-18 01:13:20 +09:00
polygons examples: Use the new keys 2021-04-18 01:13:20 +09:00
raycasting examples: Use the new keys 2021-04-18 01:13:20 +09:00
resources examples/resources: Unify jab.wav to 48000 Hz 2021-05-25 22:32:50 +09:00
rotate examples/rotate: Update the resolution 2020-11-05 00:37:24 +09:00
set Remove supporting jsgo 2020-10-07 00:46:07 +09:00
shader examples: Use the new keys 2021-04-18 01:13:20 +09:00
shapes mipmap: Stop using negative mipmaps 2020-10-31 02:52:40 +09:00
sinewave examples: Update resolutions 2020-10-31 02:06:45 +09:00
snake examples: Use the new keys 2021-04-18 01:13:20 +09:00
sprites examples: Use the new keys 2021-04-18 01:13:20 +09:00
spriteshd examples: Use the new keys 2021-04-18 01:13:20 +09:00
squiral Remove supporting jsgo 2020-10-07 00:46:07 +09:00
text Remove supporting jsgo 2020-10-07 00:46:07 +09:00
tiles examples/tiles: Misspelling 2021-03-09 03:23:53 +09:00
touch Add a new Touch example (#1547) 2021-03-24 22:27:12 +09:00
typewriter examples: Use the new keys 2021-04-18 01:13:20 +09:00
ui Remove supporting jsgo 2020-10-07 00:46:07 +09:00
vector Remove supporting jsgo 2020-10-07 00:46:07 +09:00
wav examples/resources: Unify jab.wav to 48000 Hz 2021-05-25 22:32:50 +09:00
wheel examples: Update resolutions 2020-10-31 02:06:45 +09:00
windowclosing ebiten: Add IsWindowBeingClosed / SetWindowClosingHandled / IsWindowClosingHandled 2021-06-14 02:29:11 +09:00
windowsize examples/windowsize: Bug fix: Suppress calling SetWindowPosition if the position is not updated 2021-04-20 20:48:46 +09:00
README.md Update import paths in the documents 2020-10-04 05:07:08 +09:00

How to execute the examples

Desktops

go run -tags=example github.com/hajimehoshi/ebiten/examples/rotate

Android

Install gomobile first.

gomobile install -tags=example github.com/hajimehoshi/ebiten/examples/rotate

iOS

gomobile build -target=ios -tags=example -work github.com/hajimehoshi/ebiten/examples/rotate

Then, open the WORK directory, open main.xcodeproj, add signing, and run the project.