From ede98b2f2c02de6c415366ce64780b20c04dd09c Mon Sep 17 00:00:00 2001 From: Merlijn Wajer Date: Tue, 22 Jun 2010 22:08:35 +0200 Subject: [PATCH] Example script reference doc. Is this setup O-K? --- Doc/sphinx/conf.py | 4 +- Doc/sphinx/referencescript.rst | 1 + Doc/sphinx/scriptref/mouseandkeyboard.rst | 64 +++++++++++++++++++++++ Doc/sphinx/whatsnew.rst | 1 - 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 Doc/sphinx/scriptref/mouseandkeyboard.rst diff --git a/Doc/sphinx/conf.py b/Doc/sphinx/conf.py index 367a269..76fe01c 100644 --- a/Doc/sphinx/conf.py +++ b/Doc/sphinx/conf.py @@ -47,9 +47,9 @@ copyright = u'2010, Merlijn Wajer' # built documents. # # The short X.Y version. -version = '0.695' +version = '0.700' # The full version, including alpha/beta/rc tags. -release = '0.695' +release = '0.700' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/Doc/sphinx/referencescript.rst b/Doc/sphinx/referencescript.rst index 606d7a7..6150f4b 100644 --- a/Doc/sphinx/referencescript.rst +++ b/Doc/sphinx/referencescript.rst @@ -5,4 +5,5 @@ Scripting Reference hoi .. toctree:: + scriptref/mouseandkeyboard.rst scriptref/files.rst diff --git a/Doc/sphinx/scriptref/mouseandkeyboard.rst b/Doc/sphinx/scriptref/mouseandkeyboard.rst new file mode 100644 index 0000000..00b7903 --- /dev/null +++ b/Doc/sphinx/scriptref/mouseandkeyboard.rst @@ -0,0 +1,64 @@ +Mouse and Keyboard +================== + +Types +----- + +A few variables are exported for working with Mufasa Mouse Functions. + +TClickType, which defines the click type. + +.. code-block:: pascal + + const + mouse_Right = 0 + mouse_Left = 1 + mouse_Middle = 2 + +TMousePress, which defines if the mouse button is to be down or up. + +.. code-block:: pascal + + TMousePress = (mouse_Down, mouse_Up); + +MoveMouse +~~~~~~~~~ + +.. code-block:: pascal + + procedure MoveMouse(x, y: integer); + +MoveMouse moves the mouse pointer to the specified x and y coordinates. + +GetMousePos +~~~~~~~~~~~ + +.. code-block:: pascal + + procedure GetMousePos(var x, y: integer); + +GetMousePos returns the current position of the mouse in x and +y. + + +HoldMouse +~~~~~~~~~ + +.. code-block:: pascal + + procedure HoldMouse(x, y: Integer; clickType: TClickType); + +HoldMouse holds the given mouse button (clickType) down at the specified +x, y coordinate. If the mouse if not at the given x, y yet, the mouse position +will be set to x, y. + +ReleaseMouse +~~~~~~~~~~~~ + +.. code-block:: pascal + + procedure ReleaseMouse(x, y: Integer; clickType: TClickType); + +HoldMouse holds the given mouse button (clickType) down at the specified +x, y coordinate. If the mouse if not at the given x, y yet, the +mouse position will be set to x, y. diff --git a/Doc/sphinx/whatsnew.rst b/Doc/sphinx/whatsnew.rst index 4e8031a..b741be7 100644 --- a/Doc/sphinx/whatsnew.rst +++ b/Doc/sphinx/whatsnew.rst @@ -17,5 +17,4 @@ Changelog for X.XXX:: - Did some stuff - Important note about stuff here. - Other stuff - - Jesus Christ even more stuff!