Skip to content

Commit

Permalink
Add captions and line numbers to examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
pvcraven committed Apr 23, 2017
1 parent e6fc085 commit 51d072d
Show file tree
Hide file tree
Showing 45 changed files with 89 additions and 12 deletions.
9 changes: 3 additions & 6 deletions doc/_static/css/custom.css
Expand Up @@ -13,9 +13,6 @@
margin-left: 2px;
margin-right: 2px;
}
h1 {
width: 100%;
}
h2 {
width: 100%;
}
.rst-content .highlight>pre {
line-height: 1.5;
}
2 changes: 1 addition & 1 deletion doc/conf.py
Expand Up @@ -73,7 +73,7 @@

# General information about the project.
project = 'Arcade'
copyright = '2016, Paul Vincent Craven'
copyright = '2017, Paul Vincent Craven'
author = 'Paul Vincent Craven'

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 2 additions & 0 deletions doc/examples/array_backed_grid.rst
Expand Up @@ -12,3 +12,5 @@ Array-Backed Grid
:alt: Screenshot of a program that shows an array backed grid.

.. literalinclude:: ../../examples/array_backed_grid.py
:caption: array_backed_grid.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/asteroid_smasher.rst
Expand Up @@ -8,3 +8,5 @@ This is a sample asteroid smasher game made with the Arcade library.
<iframe width="420" height="315" src="https://www.youtube.com/embed/lz_DCy0_Sj0" frameborder="0" allowfullscreen></iframe>

.. literalinclude:: ../../examples/asteroid_smasher.py
:caption: asteroid_smasher.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/bouncing_ball.rst
Expand Up @@ -12,3 +12,5 @@ Bouncing Ball with Gravity
:alt: Screen shot of bouncing ball

.. literalinclude:: ../../examples/bouncing_ball.py
:caption: bouncing_ball.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/bouncing_balls.rst
Expand Up @@ -12,3 +12,5 @@ Multiple Bouncing Balls
:alt: Screen shot of bouncing balls

.. literalinclude:: ../../examples/bouncing_balls.py
:caption: bouncing_balls.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/bouncing_rectangle.rst
Expand Up @@ -20,3 +20,5 @@ If you are familiar with classes, see some of the following examples as well:
<p><a href="https://vimeo.com/168063840">Bouncing Rectangle Example</a> from <a href="https://vimeo.com/user6672093">Paul Vincent Craven</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

.. literalinclude:: ../../examples/bouncing_rectangle.py
:caption: bouncing_rectangle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/drawing_primitives.rst
Expand Up @@ -23,4 +23,6 @@ functions or classes before drawing images.
.. literalinclude:: ../../examples/drawing_primitives.py
:caption: drawing_primitives.py
:linenos:

2 changes: 2 additions & 0 deletions doc/examples/drawing_text.rst
Expand Up @@ -12,3 +12,5 @@ Drawing Text
:alt: Screenshot of drawing text

.. literalinclude:: ../../examples/drawing_text.py
:caption: drawing_text.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/drawing_with_functions.rst
Expand Up @@ -20,4 +20,6 @@ This example shows how to define functions that draw objects. Such as
.. :alt: Screenshot of drawing with functions example program
.. literalinclude:: ../../examples/drawing_with_functions.py
:caption: drawing_with_functions.py
:linenos:

2 changes: 2 additions & 0 deletions doc/examples/drawing_with_loops.rst
Expand Up @@ -12,3 +12,5 @@ Drawing with Loops
:alt: Screen shot of drawing with loops example program

.. literalinclude:: ../../examples/drawing_with_loops.py
:caption: drawing_with_loops.py
:linenos:
4 changes: 0 additions & 4 deletions doc/examples/index.rst
Expand Up @@ -93,10 +93,6 @@ Drawing with Loops

:ref:`snow`

.. toctree::
:maxdepth: 3


User Control
------------

Expand Down
2 changes: 2 additions & 0 deletions doc/examples/instruction_and_game_over_screens.rst
Expand Up @@ -10,3 +10,5 @@ Sprites: Instruction and Game Over Screens
:alt: Screenshot of game over screen

.. literalinclude:: ../../examples/instruction_and_game_over_screens.py
:caption: instruction_and_game_over_screens.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/joystick.rst
Expand Up @@ -4,3 +4,5 @@ Full Joystick Example
=====================

.. literalinclude:: ../../examples/joystick.py
:caption: joystick.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/move_joystick.rst
Expand Up @@ -4,3 +4,5 @@ User control: Joystick
======================

.. literalinclude:: ../../examples/move_joystick.py
:caption: move_joystick.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/move_keyboard.rst
Expand Up @@ -10,3 +10,5 @@ User control: Keyboard
:alt: Screenshot of keyboard example program

.. literalinclude:: ../../examples/move_keyboard.py
:caption: move_keyboard.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/move_mouse.rst
Expand Up @@ -10,3 +10,5 @@ User control: Mouse
:alt: Screenshot of mouse example program

.. literalinclude:: ../../examples/move_mouse.py
:caption: move_mouse.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/nested_loops_bottom_left_triangle.rst
Expand Up @@ -12,3 +12,5 @@ Bottom Left Triangle
:alt: Draw a triangle with nested loops.

.. literalinclude:: ../../examples/nested_loops_bottom_left_triangle.py
:caption: nested_loops_bottom_left_triangle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/nested_loops_bottom_right_triangle.rst
Expand Up @@ -12,3 +12,5 @@ Bottom Right Triangle
:alt: Draw a triangle with nested loops.

.. literalinclude:: ../../examples/nested_loops_bottom_right_triangle.py
:caption: nested_loops_bottom_right_triangle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/nested_loops_box.rst
Expand Up @@ -12,3 +12,5 @@ Draw a Box with Nested Loops
:alt: Screenshot of a program that shows an box with nested loops.

.. literalinclude:: ../../examples/nested_loops_box.py
:caption: nested_loops_box.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/nested_loops_top_left_triangle.rst
Expand Up @@ -12,3 +12,5 @@ Top Left Triangle
:alt: Draw a triangle with nested loops.

.. literalinclude:: ../../examples/nested_loops_top_left_triangle.py
:caption: nested_loops_top_left_triangle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/nested_loops_top_right_triangle.rst
Expand Up @@ -12,3 +12,5 @@ Top Right Triangle
:alt: Draw a triangle with nested loops.

.. literalinclude:: ../../examples/nested_loops_top_right_triangle.py
:caption: nested_loops_top_right_triangle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/radar_sweep.rst
Expand Up @@ -12,3 +12,5 @@ Radar Sweep
:alt: Screenshot of radar sweep example

.. literalinclude:: ../../examples/radar_sweep.py
:caption: radar_sweep.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/shapes.rst
Expand Up @@ -12,3 +12,5 @@ Drawing Shapes with Classes
:alt: Screenshot of Shapes example program

.. literalinclude:: ../../examples/shapes.py
:caption: shapes.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/snow.rst
Expand Up @@ -12,3 +12,5 @@ Falling Snow
:alt: Screen shot of using using an array for snow

.. literalinclude:: ../../examples/snow.py
:caption: snow.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_bullets.rst
Expand Up @@ -10,3 +10,5 @@ Shoot Bullets Upwards
:alt: Screenshot of using sprites to shoot things

.. literalinclude:: ../../examples/sprite_bullets.py
:caption: sprite_bullets.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_bullets_aimed.rst
Expand Up @@ -10,3 +10,5 @@ Aim and Shoot Bullets
:alt: Screenshot of using sprites to shoot things

.. literalinclude:: ../../examples/sprite_bullets_aimed.py
:caption: sprite_bullets_aimed.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_change_coins.rst
Expand Up @@ -10,3 +10,5 @@ Change coins
:alt: Screenshot of using sprites to change coins

.. literalinclude:: ../../examples/sprite_change_coins.py
:caption: sprite_change_coins.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins.rst
Expand Up @@ -10,3 +10,5 @@ Collect Coins - Mouse
:alt: Screenshot of using sprites to collect coins

.. literalinclude:: ../../examples/sprite_collect_coins.py
:caption: sprite_collect_coins.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins_background.rst
Expand Up @@ -10,3 +10,5 @@ Using a Background Image
:alt: Screenshot of using sprites to collect coins and a background image

.. literalinclude:: ../../examples/sprite_collect_coins_background.py
:caption: sprite_collect_coins_background.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins_diff_levels.rst
Expand Up @@ -10,3 +10,5 @@ Different Levels
:alt: Screenshot of using sprites to collect coins

.. literalinclude:: ../../examples/sprite_collect_coins_diff_levels.py
:caption: sprite_collect_coins_diff_levels.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins_move_bouncing.rst
Expand Up @@ -10,3 +10,5 @@ Collect Coins that are Bouncing
:alt: Screenshot of using sprites to collect coins

.. literalinclude:: ../../examples/sprite_collect_coins_move_bouncing.py
:caption: sprite_collect_coins_move_bouncing.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins_move_circle.rst
Expand Up @@ -10,3 +10,5 @@ Collect Coins that are Moving in a Circle
:alt: Screenshot of using sprites to collect coins

.. literalinclude:: ../../examples/sprite_collect_coins_move_circle.py
:caption: sprite_collect_coins_move_circle.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_collect_coins_move_down.rst
Expand Up @@ -10,3 +10,5 @@ Collect Coins Moving Down
:alt: Screenshot of using sprites to collect coins

.. literalinclude:: ../../examples/sprite_collect_coins_move_down.py
:caption: sprite_collect_coins_move_down.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_face_left_or_right.rst
Expand Up @@ -5,3 +5,5 @@ Sprite: Face Left or Right


.. literalinclude:: ../../examples/sprite_face_left_or_right.py
:caption: sprite_face_left_or_right.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_move_animation.rst
Expand Up @@ -9,3 +9,5 @@ Move with a sprite animation


.. literalinclude:: ../../examples/sprite_move_animation.py
:caption: sprite_move_animation.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_move_joystick.rst
Expand Up @@ -4,3 +4,5 @@ Collect Coins - Joystick
========================

.. literalinclude:: ../../examples/sprite_move_joystick.py
:caption: sprite_move_joystick.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_move_keyboard.rst
Expand Up @@ -4,3 +4,5 @@ Collect Coins - Keyboard
========================

.. literalinclude:: ../../examples/sprite_move_keyboard.py
:caption: sprite_move_keyboard.py
:linenos:
4 changes: 3 additions & 1 deletion doc/examples/sprite_move_scrolling.rst
Expand Up @@ -7,6 +7,8 @@ Move with a scrolling screen
:width: 600px
:height: 600px
:align: center
:alt: Screenshot of using a scrolling window
:alt: Screen shot of using a scrolling window

.. literalinclude:: ../../examples/sprite_move_scrolling.py
:caption: sprite_move_scrolling.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_move_walls.rst
Expand Up @@ -10,3 +10,5 @@ Move with walls
:alt: Screenshot of using sprites to detect wall collisions

.. literalinclude:: ../../examples/sprite_move_walls.py
:caption: sprite_move_walls.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_moving_platforms.rst
Expand Up @@ -9,3 +9,5 @@ Moving Platforms


.. literalinclude:: ../../examples/sprite_moving_platforms.py
:caption: sprite_moving_platforms.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_ramps.rst
Expand Up @@ -8,3 +8,5 @@ Ramps
<iframe width="420" height="315" src="https://www.youtube.com/embed/pg_jJlYiMOA" frameborder="0" allowfullscreen></iframe>

.. literalinclude:: ../../examples/sprite_ramps.py
:caption: sprite_ramps.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/sprite_tiled_map.rst
Expand Up @@ -10,3 +10,5 @@ Work with a tiled map
:alt: Screenshot of using a larger map exported by tiled in a csv format.

.. literalinclude:: ../../examples/sprite_tiled_map.py
:caption: sprite_tiled_map.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/starting_template.rst
Expand Up @@ -9,3 +9,5 @@ Classes: Starting Template
<p><a href="https://vimeo.com/168051968">Starting Template for the Arcade Library</a> from <a href="https://vimeo.com/user6672093">Paul Vincent Craven</a> on <a href="https://vimeo.com">Vimeo</a>.</p>

.. literalinclude:: ../../examples/starting_template.py
:caption: starting_template.py
:linenos:
2 changes: 2 additions & 0 deletions doc/examples/timer.rst
Expand Up @@ -10,3 +10,5 @@ On-Screen Timer
:alt: Screenshot of running a timer

.. literalinclude:: ../../examples/timer.py
:caption: timer.py
:linenos:

0 comments on commit 51d072d

Please sign in to comment.