summaryrefslogtreecommitdiffhomepage
path: root/deploy_template/mygame/documentation/07-mouse.md
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2019-09-06 15:33:10 -0500
committerAmir Rajan <[email protected]>2019-09-06 15:33:10 -0500
commit220c3f0ed4a323d5d7e354c7f1b7ff1e8b16c4e9 (patch)
treeea88e9c1425389a0fe4df8fb3d411a7c5fed1542 /deploy_template/mygame/documentation/07-mouse.md
parent9c2ce126dba8a4c3ada82e5f4bd6637b1fa92ab0 (diff)
downloaddragonruby-game-toolkit-contrib-220c3f0ed4a323d5d7e354c7f1b7ff1e8b16c4e9.tar.gz
dragonruby-game-toolkit-contrib-220c3f0ed4a323d5d7e354c7f1b7ff1e8b16c4e9.zip
Added deploy_template to contribe.
Diffstat (limited to 'deploy_template/mygame/documentation/07-mouse.md')
-rw-r--r--deploy_template/mygame/documentation/07-mouse.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/deploy_template/mygame/documentation/07-mouse.md b/deploy_template/mygame/documentation/07-mouse.md
new file mode 100644
index 0000000..cbace44
--- /dev/null
+++ b/deploy_template/mygame/documentation/07-mouse.md
@@ -0,0 +1,29 @@
+# Mouse
+
+Determining current position of mouse:
+
+```
+args.inputs.mouse.x
+args.inputs.mouse.y
+```
+
+Determining if the mouse has been clicked, and it's position. Note:
+`click` and `down` are aliases for each other.
+
+```
+if args.inputs.mouse.click
+ puts args.inputs.mouse.click
+ puts args.inputs.mouse.click.point.x
+ puts args.inputs.mouse.click.point.y
+end
+```
+
+Determining if the mouse button has been released:
+
+```
+if args.inputs.mouse.up
+ puts args.inputs.mouse.up
+ puts args.inputs.mouse.up.point.x
+ puts args.inputs.mouse.up.point.y
+end
+```