diff --git a/input/mouse_and_touch/assets/SourceSansPro-Semibold.ttf b/input/mouse_and_touch/assets/fonts/SourceSansPro-Semibold.ttf old mode 100755 new mode 100644 similarity index 100% rename from input/mouse_and_touch/assets/SourceSansPro-Semibold.ttf rename to input/mouse_and_touch/assets/fonts/SourceSansPro-Semibold.ttf diff --git a/input/mouse_and_touch/assets/fonts/text28.font b/input/mouse_and_touch/assets/fonts/text28.font new file mode 100644 index 00000000..ca069a57 --- /dev/null +++ b/input/mouse_and_touch/assets/fonts/text28.font @@ -0,0 +1,5 @@ +font: "/assets/fonts/SourceSansPro-Semibold.ttf" +material: "/builtins/fonts/font-df.material" +size: 28 +output_format: TYPE_DISTANCE_FIELD +characters: " !\"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" diff --git a/input/mouse_and_touch/assets/images/bar_round_large_grey.png b/input/mouse_and_touch/assets/images/bar_round_large_grey.png deleted file mode 100644 index 9486a6db..00000000 Binary files a/input/mouse_and_touch/assets/images/bar_round_large_grey.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bar_round_large_red.png b/input/mouse_and_touch/assets/images/bar_round_large_red.png deleted file mode 100644 index a6dcdc2f..00000000 Binary files a/input/mouse_and_touch/assets/images/bar_round_large_red.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee01.png b/input/mouse_and_touch/assets/images/bee/Bee01.png deleted file mode 100644 index c5f2fef3..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee01.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee02.png b/input/mouse_and_touch/assets/images/bee/Bee02.png deleted file mode 100644 index e121d4e7..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee02.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee03.png b/input/mouse_and_touch/assets/images/bee/Bee03.png deleted file mode 100644 index a6deb88b..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee03.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee04.png b/input/mouse_and_touch/assets/images/bee/Bee04.png deleted file mode 100644 index 60d3a97f..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee04.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee05.png b/input/mouse_and_touch/assets/images/bee/Bee05.png deleted file mode 100644 index 88aed730..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee05.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee06.png b/input/mouse_and_touch/assets/images/bee/Bee06.png deleted file mode 100644 index 9778f352..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee06.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee07.png b/input/mouse_and_touch/assets/images/bee/Bee07.png deleted file mode 100644 index a242c19e..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee07.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee08.png b/input/mouse_and_touch/assets/images/bee/Bee08.png deleted file mode 100644 index a79e4fe5..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee08.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee09.png b/input/mouse_and_touch/assets/images/bee/Bee09.png deleted file mode 100644 index 4977f9bf..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee09.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee10.png b/input/mouse_and_touch/assets/images/bee/Bee10.png deleted file mode 100644 index 8ff369f0..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee10.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee11.png b/input/mouse_and_touch/assets/images/bee/Bee11.png deleted file mode 100644 index bf1e616b..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee11.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee12.png b/input/mouse_and_touch/assets/images/bee/Bee12.png deleted file mode 100644 index cb6f2661..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee12.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee13.png b/input/mouse_and_touch/assets/images/bee/Bee13.png deleted file mode 100644 index 2cd74e24..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee13.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee14.png b/input/mouse_and_touch/assets/images/bee/Bee14.png deleted file mode 100644 index e3c2c57a..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee14.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee15.png b/input/mouse_and_touch/assets/images/bee/Bee15.png deleted file mode 100644 index 87b6eff4..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee15.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee16.png b/input/mouse_and_touch/assets/images/bee/Bee16.png deleted file mode 100644 index 25cdd151..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee16.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee17.png b/input/mouse_and_touch/assets/images/bee/Bee17.png deleted file mode 100644 index a4d73a60..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee17.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee18.png b/input/mouse_and_touch/assets/images/bee/Bee18.png deleted file mode 100644 index bca01fee..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee18.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee19.png b/input/mouse_and_touch/assets/images/bee/Bee19.png deleted file mode 100644 index 130ddb62..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee19.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee20.png b/input/mouse_and_touch/assets/images/bee/Bee20.png deleted file mode 100644 index e9f9a974..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee20.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee21.png b/input/mouse_and_touch/assets/images/bee/Bee21.png deleted file mode 100644 index a272b572..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee21.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee22.png b/input/mouse_and_touch/assets/images/bee/Bee22.png deleted file mode 100644 index 4e6f10e9..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee22.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee23.png b/input/mouse_and_touch/assets/images/bee/Bee23.png deleted file mode 100644 index bd8d4a20..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee23.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee24.png b/input/mouse_and_touch/assets/images/bee/Bee24.png deleted file mode 100644 index 9e6135a3..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee24.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot01.png b/input/mouse_and_touch/assets/images/bee/Bee_shot01.png deleted file mode 100644 index a334d16d..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot01.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot02.png b/input/mouse_and_touch/assets/images/bee/Bee_shot02.png deleted file mode 100644 index fd74875c..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot02.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot03.png b/input/mouse_and_touch/assets/images/bee/Bee_shot03.png deleted file mode 100644 index 48d2d6c0..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot03.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot04.png b/input/mouse_and_touch/assets/images/bee/Bee_shot04.png deleted file mode 100644 index 0b80ded3..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot04.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot05.png b/input/mouse_and_touch/assets/images/bee/Bee_shot05.png deleted file mode 100644 index b8799bce..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot05.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot06.png b/input/mouse_and_touch/assets/images/bee/Bee_shot06.png deleted file mode 100644 index 0fc01d07..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot06.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot07.png b/input/mouse_and_touch/assets/images/bee/Bee_shot07.png deleted file mode 100644 index a6ce6085..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot07.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot08.png b/input/mouse_and_touch/assets/images/bee/Bee_shot08.png deleted file mode 100644 index 900b250e..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot08.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot09.png b/input/mouse_and_touch/assets/images/bee/Bee_shot09.png deleted file mode 100644 index ac45bc8f..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot09.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Bee_shot10.png b/input/mouse_and_touch/assets/images/bee/Bee_shot10.png deleted file mode 100644 index 8155ae6b..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Bee_shot10.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting01.png b/input/mouse_and_touch/assets/images/bee/Sting01.png deleted file mode 100644 index 62ebb7e5..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting01.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting02.png b/input/mouse_and_touch/assets/images/bee/Sting02.png deleted file mode 100644 index c9e6e849..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting02.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting03.png b/input/mouse_and_touch/assets/images/bee/Sting03.png deleted file mode 100644 index 595a3d5f..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting03.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting04.png b/input/mouse_and_touch/assets/images/bee/Sting04.png deleted file mode 100644 index 525bb022..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting04.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting05.png b/input/mouse_and_touch/assets/images/bee/Sting05.png deleted file mode 100644 index 7eb5ae95..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting05.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting06.png b/input/mouse_and_touch/assets/images/bee/Sting06.png deleted file mode 100644 index fd1d8f3e..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting06.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting07.png b/input/mouse_and_touch/assets/images/bee/Sting07.png deleted file mode 100644 index 5a56c3bb..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting07.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting08.png b/input/mouse_and_touch/assets/images/bee/Sting08.png deleted file mode 100644 index 5ff6c1e9..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting08.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bee/Sting09.png b/input/mouse_and_touch/assets/images/bee/Sting09.png deleted file mode 100644 index bd15342a..00000000 Binary files a/input/mouse_and_touch/assets/images/bee/Sting09.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bunny1_ready.png b/input/mouse_and_touch/assets/images/bunny1_ready.png deleted file mode 100755 index be968a81..00000000 Binary files a/input/mouse_and_touch/assets/images/bunny1_ready.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/bunny2_ready.png b/input/mouse_and_touch/assets/images/bunny2_ready.png deleted file mode 100755 index 12216d98..00000000 Binary files a/input/mouse_and_touch/assets/images/bunny2_ready.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/carrot.png b/input/mouse_and_touch/assets/images/carrot.png deleted file mode 100755 index d630937f..00000000 Binary files a/input/mouse_and_touch/assets/images/carrot.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/close.png b/input/mouse_and_touch/assets/images/close.png deleted file mode 100644 index de1a2ca3..00000000 Binary files a/input/mouse_and_touch/assets/images/close.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/coin/dcoin_1.png b/input/mouse_and_touch/assets/images/coin/dcoin_1.png deleted file mode 100644 index fe991c27..00000000 Binary files a/input/mouse_and_touch/assets/images/coin/dcoin_1.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/coin/dcoin_2.png b/input/mouse_and_touch/assets/images/coin/dcoin_2.png deleted file mode 100644 index 5b862ff5..00000000 Binary files a/input/mouse_and_touch/assets/images/coin/dcoin_2.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/coin/dcoin_3.png b/input/mouse_and_touch/assets/images/coin/dcoin_3.png deleted file mode 100644 index d09ac010..00000000 Binary files a/input/mouse_and_touch/assets/images/coin/dcoin_3.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/coin/dcoin_4.png b/input/mouse_and_touch/assets/images/coin/dcoin_4.png deleted file mode 100644 index f5a6c64e..00000000 Binary files a/input/mouse_and_touch/assets/images/coin/dcoin_4.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/coin/dcoin_5.png b/input/mouse_and_touch/assets/images/coin/dcoin_5.png deleted file mode 100644 index ce40d5b6..00000000 Binary files a/input/mouse_and_touch/assets/images/coin/dcoin_5.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/crosshair010.png b/input/mouse_and_touch/assets/images/crosshair010.png deleted file mode 100755 index ca83cce3..00000000 Binary files a/input/mouse_and_touch/assets/images/crosshair010.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/elementMetal001.png b/input/mouse_and_touch/assets/images/elementMetal001.png deleted file mode 100755 index 22ba2237..00000000 Binary files a/input/mouse_and_touch/assets/images/elementMetal001.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/elementStone019.png b/input/mouse_and_touch/assets/images/elementStone019.png deleted file mode 100755 index 0a85d3f2..00000000 Binary files a/input/mouse_and_touch/assets/images/elementStone019.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/elementStone023.png b/input/mouse_and_touch/assets/images/elementStone023.png deleted file mode 100755 index a302187b..00000000 Binary files a/input/mouse_and_touch/assets/images/elementStone023.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/enemyBlack1.png b/input/mouse_and_touch/assets/images/enemyBlack1.png deleted file mode 100755 index bc2fa4c1..00000000 Binary files a/input/mouse_and_touch/assets/images/enemyBlack1.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/enemyFloating_1.png b/input/mouse_and_touch/assets/images/enemyFloating_1.png deleted file mode 100644 index d06ec183..00000000 Binary files a/input/mouse_and_touch/assets/images/enemyFloating_1.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/flame.png b/input/mouse_and_touch/assets/images/flame.png deleted file mode 100755 index 083f8c56..00000000 Binary files a/input/mouse_and_touch/assets/images/flame.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/green_button03.png b/input/mouse_and_touch/assets/images/green_button03.png deleted file mode 100755 index 3add9b6e..00000000 Binary files a/input/mouse_and_touch/assets/images/green_button03.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/grid.png b/input/mouse_and_touch/assets/images/grid.png deleted file mode 100644 index d23eb9d7..00000000 Binary files a/input/mouse_and_touch/assets/images/grid.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/header.png b/input/mouse_and_touch/assets/images/header.png deleted file mode 100644 index 04f48506..00000000 Binary files a/input/mouse_and_touch/assets/images/header.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/hitman1_machine.png b/input/mouse_and_touch/assets/images/hitman1_machine.png deleted file mode 100755 index ddc7f059..00000000 Binary files a/input/mouse_and_touch/assets/images/hitman1_machine.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/laserYellow_burst.png b/input/mouse_and_touch/assets/images/laserYellow_burst.png deleted file mode 100755 index 0496e0ce..00000000 Binary files a/input/mouse_and_touch/assets/images/laserYellow_burst.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/lighting_blue.png b/input/mouse_and_touch/assets/images/lighting_blue.png deleted file mode 100755 index 784da1e2..00000000 Binary files a/input/mouse_and_touch/assets/images/lighting_blue.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/logo-color.png b/input/mouse_and_touch/assets/images/logo-color.png deleted file mode 100644 index 0e227dcf..00000000 Binary files a/input/mouse_and_touch/assets/images/logo-color.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/particle_brown.png b/input/mouse_and_touch/assets/images/particle_brown.png deleted file mode 100755 index 652076a3..00000000 Binary files a/input/mouse_and_touch/assets/images/particle_brown.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/pattern_circle.png b/input/mouse_and_touch/assets/images/pattern_circle.png deleted file mode 100644 index 221dce93..00000000 Binary files a/input/mouse_and_touch/assets/images/pattern_circle.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/plank_slice.png b/input/mouse_and_touch/assets/images/plank_slice.png deleted file mode 100644 index 7b8a5cae..00000000 Binary files a/input/mouse_and_touch/assets/images/plank_slice.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/playerShip1_red.png b/input/mouse_and_touch/assets/images/playerShip1_red.png deleted file mode 100755 index 3695e09e..00000000 Binary files a/input/mouse_and_touch/assets/images/playerShip1_red.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/rainbow.png b/input/mouse_and_touch/assets/images/rainbow.png deleted file mode 100644 index 00ea4574..00000000 Binary files a/input/mouse_and_touch/assets/images/rainbow.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/red_button12.png b/input/mouse_and_touch/assets/images/red_button12.png deleted file mode 100755 index 7b6a2327..00000000 Binary files a/input/mouse_and_touch/assets/images/red_button12.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/shipBeige_manned.png b/input/mouse_and_touch/assets/images/shipBeige_manned.png deleted file mode 100755 index 552a8438..00000000 Binary files a/input/mouse_and_touch/assets/images/shipBeige_manned.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/shipBlue_manned.png b/input/mouse_and_touch/assets/images/shipBlue_manned.png deleted file mode 100644 index c5ecb9fa..00000000 Binary files a/input/mouse_and_touch/assets/images/shipBlue_manned.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/shipGreen_manned.png b/input/mouse_and_touch/assets/images/shipGreen_manned.png deleted file mode 100644 index 82815b6a..00000000 Binary files a/input/mouse_and_touch/assets/images/shipGreen_manned.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/shipPink_manned.png b/input/mouse_and_touch/assets/images/shipPink_manned.png deleted file mode 100644 index fb7c49e7..00000000 Binary files a/input/mouse_and_touch/assets/images/shipPink_manned.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/smoke.png b/input/mouse_and_touch/assets/images/smoke.png deleted file mode 100755 index 21a4e68c..00000000 Binary files a/input/mouse_and_touch/assets/images/smoke.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/spinner.png b/input/mouse_and_touch/assets/images/spinner.png deleted file mode 100644 index 27a9025b..00000000 Binary files a/input/mouse_and_touch/assets/images/spinner.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/images/tilesheet_complete.png b/input/mouse_and_touch/assets/images/tilesheet_complete.png deleted file mode 100644 index 3403051d..00000000 Binary files a/input/mouse_and_touch/assets/images/tilesheet_complete.png and /dev/null differ diff --git a/input/mouse_and_touch/assets/sprites.atlas b/input/mouse_and_touch/assets/sprites.atlas deleted file mode 100644 index fa71c484..00000000 --- a/input/mouse_and_touch/assets/sprites.atlas +++ /dev/null @@ -1,93 +0,0 @@ -images { - image: "/assets/images/spinner.png" -} -images { - image: "/assets/images/elementStone019.png" -} -images { - image: "/assets/images/elementStone023.png" -} -images { - image: "/assets/images/bunny1_ready.png" -} -images { - image: "/assets/images/bunny2_ready.png" -} -images { - image: "/assets/images/carrot.png" -} -images { - image: "/assets/images/red_button12.png" -} -images { - image: "/assets/images/flame.png" -} -images { - image: "/assets/images/smoke.png" -} -images { - image: "/assets/images/rainbow.png" -} -images { - image: "/assets/images/enemyFloating_1.png" -} -images { - image: "/assets/images/logo-color.png" -} -images { - image: "/assets/images/shipGreen_manned.png" -} -images { - image: "/assets/images/elementMetal001.png" -} -images { - image: "/assets/images/plank_slice.png" -} -images { - image: "/assets/images/hitman1_machine.png" -} -images { - image: "/assets/images/green_button03.png" -} -images { - image: "/assets/images/playerShip1_red.png" -} -images { - image: "/assets/images/enemyBlack1.png" -} -images { - image: "/assets/images/lighting_blue.png" -} -images { - image: "/assets/images/particle_brown.png" -} -images { - image: "/assets/images/crosshair010.png" -} -images { - image: "/assets/images/bar_round_large_grey.png" -} -images { - image: "/assets/images/bar_round_large_red.png" -} -animations { - id: "coin" - images { - image: "/assets/images/coin/dcoin_1.png" - } - images { - image: "/assets/images/coin/dcoin_2.png" - } - images { - image: "/assets/images/coin/dcoin_3.png" - } - images { - image: "/assets/images/coin/dcoin_4.png" - } - images { - image: "/assets/images/coin/dcoin_5.png" - } - playback: PLAYBACK_LOOP_FORWARD - fps: 8 -} -extrude_borders: 2 diff --git a/input/mouse_and_touch/assets/text24.font b/input/mouse_and_touch/assets/text24.font deleted file mode 100644 index 43745c0d..00000000 --- a/input/mouse_and_touch/assets/text24.font +++ /dev/null @@ -1,17 +0,0 @@ -font: "/assets/SourceSansPro-Semibold.ttf" -material: "/builtins/fonts/font.material" -size: 24 -antialias: 1 -alpha: 1.0 -outline_alpha: 0.0 -outline_width: 0.0 -shadow_alpha: 0.0 -shadow_blur: 0 -shadow_x: 0.0 -shadow_y: 0.0 -extra_characters: "" -output_format: TYPE_BITMAP -all_chars: false -cache_width: 0 -cache_height: 0 -render_mode: MODE_SINGLE_LAYER diff --git a/input/mouse_and_touch/assets/text48.font b/input/mouse_and_touch/assets/text48.font deleted file mode 100644 index 2622c04d..00000000 --- a/input/mouse_and_touch/assets/text48.font +++ /dev/null @@ -1,5 +0,0 @@ -font: "/assets/SourceSansPro-Semibold.ttf" -material: "/builtins/fonts/font.material" -size: 48 -outline_alpha: 0.0 -outline_width: 0.0 diff --git a/input/mouse_and_touch/example.md b/input/mouse_and_touch/example.md index 9d1e1c7a..08c814b9 100644 --- a/input/mouse_and_touch/example.md +++ b/input/mouse_and_touch/example.md @@ -1,7 +1,40 @@ --- tags: input -title: Mouse and touch events -brief: Shows how to read mouse/touch movement and mouse/touch button state. +title: Mouse and Touch Events +brief: Shows how to read mouse and/or touch movement and mouse button/touch state. author: Defold Foundation scripts: mouse_and_touch.script +thumbnail: thumbnail.webp --- + +This example shows how to receive mouse and touch input in a script and display the current pointer position and button state. + +Move the mouse or touch the window to update the label. +Press and release the left mouse button or touch the screen to see the state change. + +## What You'll Learn + +* How to acquire and release input focus +* How to read pointer coordinates from `action.x` and `action.y` +* How to handle the built-in `touch` action for mouse and touch input +* How to use `action.pressed` and `action.released` + +## Setup + +The collection contains one game object with `mouse_and_touch.script` and one label component. The script receives input and updates the label text with the current pointer position and state. + +![setup](setup.png) + +The project uses the built-in `/builtins/input/all.input_bindingc` input binding. +In that binding, the left mouse button and touch input are already mapped to the `touch` and `touch_multi` actions. +You can create and setup your own input bindings, and remember to adjust the action ids in the scripts accordingly. + +![bindings](input_bindings.png) + +## How It Works + +The script asks for input focus in `init()`. After that, Defold calls `on_input()` when mouse or touch input is received. + +Each input action contains the current pointer position in `action.x` and `action.y`. When the action id is `hash("touch")` or `hash("touch_multi")`, the script checks `action.pressed` and `action.released` to update a small state string. + +The label text is written again with the pointer coordinates and the state to the local label component with `label.set_text()`. diff --git a/input/mouse_and_touch/example/mouse_and_touch.collection b/input/mouse_and_touch/example/mouse_and_touch.collection index 6c0d8489..da9db50c 100644 --- a/input/mouse_and_touch/example/mouse_and_touch.collection +++ b/input/mouse_and_touch/example/mouse_and_touch.collection @@ -5,87 +5,40 @@ embedded_instances { data: "components {\n" " id: \"mouse_and_touch\"\n" " component: \"/example/mouse_and_touch.script\"\n" - " position {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" - " }\n" "}\n" "embedded_components {\n" " id: \"label\"\n" " type: \"label\"\n" " data: \"size {\\n" - " x: 128.0\\n" + " x: 512.0\\n" " y: 32.0\\n" - " z: 0.0\\n" - " w: 0.0\\n" - "}\\n" - "scale {\\n" - " x: 1.0\\n" - " y: 1.0\\n" - " z: 1.0\\n" - " w: 0.0\\n" "}\\n" - "color {\\n" - " x: 0.0\\n" - " y: 0.0\\n" - " z: 0.0\\n" - " w: 1.0\\n" - "}\\n" - "outline {\\n" - " x: 0.0\\n" - " y: 0.0\\n" - " z: 0.0\\n" - " w: 1.0\\n" - "}\\n" - "shadow {\\n" - " x: 0.0\\n" - " y: 0.0\\n" - " z: 0.0\\n" - " w: 1.0\\n" - "}\\n" - "leading: 1.0\\n" - "tracking: 0.0\\n" "pivot: PIVOT_SW\\n" - "blend_mode: BLEND_MODE_ALPHA\\n" - "line_break: false\\n" "text: \\\"Label\\\"\\n" - "font: \\\"/assets/text24.font\\\"\\n" - "material: \\\"/builtins/fonts/label.material\\\"\\n" + "font: \\\"/assets/fonts/text28.font\\\"\\n" + "material: \\\"/builtins/fonts/label-df.material\\\"\\n" "\"\n" " position {\n" - " x: 6.0\n" - " y: 6.0\n" - " z: 0.0\n" + " x: 20.0\n" + " y: 620.0\n" " }\n" - " rotation {\n" - " x: 0.0\n" - " y: 0.0\n" - " z: 0.0\n" - " w: 1.0\n" + "}\n" + "embedded_components {\n" + " id: \"info\"\n" + " type: \"label\"\n" + " data: \"size {\\n" + " x: 512.0\\n" + " y: 32.0\\n" + "}\\n" + "pivot: PIVOT_SW\\n" + "text: \\\"Move mouse around and click or touch\\\"\\n" + "font: \\\"/assets/fonts/text28.font\\\"\\n" + "material: \\\"/builtins/fonts/label-df.material\\\"\\n" + "\"\n" + " position {\n" + " x: 20.0\n" + " y: 670.0\n" " }\n" "}\n" "" - position { - x: 0.0 - y: 0.0 - z: 0.0 - } - rotation { - x: 0.0 - y: 0.0 - z: 0.0 - w: 1.0 - } - scale3 { - x: 1.0 - y: 1.0 - z: 1.0 - } } diff --git a/input/mouse_and_touch/example/mouse_and_touch.script b/input/mouse_and_touch/example/mouse_and_touch.script index b057fac0..6cb694e9 100644 --- a/input/mouse_and_touch/example/mouse_and_touch.script +++ b/input/mouse_and_touch/example/mouse_and_touch.script @@ -1,25 +1,34 @@ function init(self) msg.post(".", "acquire_input_focus") -- <1> - self.state = "-" + self.state = "released" end +local TOUCH_ACTION_ID = hash("touch") +local TOUCH_MULTI_ACTION_ID =hash("touch_multi") + function on_input(self, action_id, action) local pos = vmath.vector3(action.x, action.y, 0) -- <2> - if action_id == hash("touch") then -- <3> + if action_id == TOUCH_ACTION_ID or action_id == TOUCH_MULTI_ACTION_ID then -- <3> if action.pressed then -- <4> self.state = "pressed" elseif action.released then -- <5> - self.state = "-" + self.state = "released" end end - local text = ("x: %d y: %d state: %s"):format(pos.x, pos.y, self.state) + local text = ("x: %d y: %d state: %s"):format(pos.x, pos.y, self.state) -- <6> label.set_text("#label", text) end +function final(self) + msg.post(".", "release_input_focus") -- <7> +end + --[[ 1. Tell the engine that this object ("." is shorthand for the current game object) wants to receive input. The function `on_input()` will be called whenever input is received. -2. Read the position of the mouse pointer or touch event -3. The left mouse button in the input bindings will also be used for touch events on a phone/tablet -4. The 'pressed' state will be true on the frame when the mouse button/finger is pressed -5. The 'released' state will be true on the frame when the mouse button/finger is released +2. Read the position of the mouse pointer or touch event. +3. The left mouse button in the input bindings will also be used for touch events on a phone/tablet. +4. The 'pressed' state will be true starting on the frame when the mouse button/finger is pressed. +5. The 'released' state will be true starting on the frame when the mouse button/finger is released. +6. Rebuild the text to include the position and state and then set this text to the label. +7. In `final` release the input focus. --]] diff --git a/input/mouse_and_touch/game.project b/input/mouse_and_touch/game.project index 03af8d38..1b84fff9 100644 --- a/input/mouse_and_touch/game.project +++ b/input/mouse_and_touch/game.project @@ -59,7 +59,7 @@ max_instances = 32765 max_emitter_count = 1024 [render] -clear_color_blue = 1.0 -clear_color_green = 1.0 -clear_color_red = 1.0 +clear_color_blue = 0.183594 +clear_color_green = 0.164063 +clear_color_red = 0.160156 diff --git a/input/mouse_and_touch/input_bindings.png b/input/mouse_and_touch/input_bindings.png new file mode 100644 index 00000000..a9db101c Binary files /dev/null and b/input/mouse_and_touch/input_bindings.png differ diff --git a/input/mouse_and_touch/setup.png b/input/mouse_and_touch/setup.png new file mode 100644 index 00000000..4804fc76 Binary files /dev/null and b/input/mouse_and_touch/setup.png differ diff --git a/input/mouse_and_touch/thumbnail.webp b/input/mouse_and_touch/thumbnail.webp new file mode 100644 index 00000000..7e04460c Binary files /dev/null and b/input/mouse_and_touch/thumbnail.webp differ