Source

pygame / docs / reST / ref / joystick.rst

Diff from to

File docs/reST/ref/joystick.rst

 ======================
 
 .. module:: pygame.joystick
-   :synopsis: pygame module for interacting with joystick devices
+   :synopsis: Pygame module for interacting with joysticks, gamepads, and trackballs.
 
-| :sl:`pygame module for interacting with joystick devices`
+| :sl:`Pygame module for interacting with joysticks, gamepads, and trackballs.`
 
-The joystick module manages the joystick devices on a computer (there can be
-more than one). Joystick devices include trackballs and video-game-style
+The joystick module manages the joystick devices on a computer.
+Joystick devices include trackballs and video-game-style
 gamepads, and the module allows the use of multiple buttons and "hats".
+Computers may manage multiple joysticks at a time.
 
-To get initialise the joystick module and get a list of Joystick instances
+Each instance of the Joystick class represents one gaming device plugged 
+into the computer. If a gaming pad has multiple joysticks on it, than the
+joystick object can actually represent multiple joysticks on that single
+game device.
+
+For a quick way to initialise the joystick module and get a list of Joystick instances
 use the following code::
 
     pygame.joystick.init()
 
 .. function:: init
 
-   | :sl:`initialize the joystick module`
+   | :sl:`Initialize the joystick module.`
    | :sg:`init() -> None`
 
    This function is called automatically by ``pygame.init()``.
 
 .. function:: quit
 
-   | :sl:`uninitialize the joystick module`
+   | :sl:`Uninitialize the joystick module.`
    | :sg:`quit() -> None`
 
    Uninitialize the joystick module. After you call this any existing joystick
 
 .. function:: get_init
 
-   | :sl:`true if the joystick module is initialized`
+   | :sl:`Returns True if the joystick module is initialized.`
    | :sg:`get_init() -> bool`
 
    Test if the ``pygame.joystick.init()`` function has been called.
 
 .. function:: get_count
 
-   | :sl:`number of joysticks on the system`
+   | :sl:`Returns the number of joysticks.`
    | :sg:`get_count() -> count`
 
    Return the number of joystick devices on the system. The count will be 0 if
 
 .. class:: Joystick
 
-   | :sl:`create a new Joystick object`
+   | :sl:`Create a new Joystick object.`
    | :sg:`Joystick(id) -> Joystick`
 
    Create a new joystick to access a physical device. The id argument must be a
    .. ## pygame.joystick.Joystick ##
 
 .. ## pygame.joystick ##
+
+.. figure:: code_examples/joystick_calls.png
+   :scale: 100 %
+   :alt: joystick module example
+
+   Example code for joystick module.
+   
+.. literalinclude:: code_examples/joystick_calls.py
+