Mercurial > pygame
changeset 3190:d49cf738e22d
Doc fixes for code example blocks, so it does not fill up entire width.
| author | Rene Dudfield <renesd@gmail.com> |
|---|---|
| date | Sat, 30 Mar 2013 14:50:49 +0100 |
| parents | 6cd516614d7f |
| children | 43d89ee1fb24 |
| files | docs/reST/themes/classic/static/pygame.css_t src/doc/display_doc.h src/doc/joystick_doc.h src/doc/sprite_doc.h |
| diffstat | 4 files changed, 98 insertions(+), 97 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/reST/themes/classic/static/pygame.css_t Sat Mar 30 14:43:51 2013 +0100 +++ b/docs/reST/themes/classic/static/pygame.css_t Sat Mar 30 14:50:49 2013 +0100 @@ -522,16 +522,17 @@ } pre { - font-family: monospace; - padding: 5px; - padding-left: 15px; - margin-bottom: 1em; - background-color: {{ theme_codebgcolor }}; - color: {{ theme_codetextcolor }}; - line-height: 120%; + background-color: #eeffcc; border: 1px solid #ac9; border-left: none; border-right: none; + color: #333333; + display: inline-block; + font-family: monospace; + line-height: 120%; + margin-bottom: 1em; + padding: 5px; + padding-left: 15px; } .warning tt {
--- a/src/doc/display_doc.h Sat Mar 30 14:43:51 2013 +0100 +++ b/src/doc/display_doc.h Sat Mar 30 14:50:49 2013 +0100 @@ -1,51 +1,51 @@ /* Auto generated file: with makeref.py . Docs go in src/ *.doc . */ #define DOC_PYGAMEDISPLAY "pygame module to control the display window and screen" -#define DOC_PYGAMEDISPLAYINIT "init() -> None\ninitialize the display module" +#define DOC_PYGAMEDISPLAYINIT "init() -> None\nInitialize the display module" -#define DOC_PYGAMEDISPLAYQUIT "quit() -> None\nuninitialize the display module" +#define DOC_PYGAMEDISPLAYQUIT "quit() -> None\nUninitialize the display module" -#define DOC_PYGAMEDISPLAYGETINIT "get_init() -> bool\ntrue if the display module is initialized" +#define DOC_PYGAMEDISPLAYGETINIT "get_init() -> bool\nReturns True if the display module has been initialized" -#define DOC_PYGAMEDISPLAYSETMODE "set_mode(resolution=(0,0), flags=0, depth=0) -> Surface\ninitialize a window or screen for display" +#define DOC_PYGAMEDISPLAYSETMODE "set_mode(resolution=(0,0), flags=0, depth=0) -> Surface\nInitialize a window or screen for display" -#define DOC_PYGAMEDISPLAYGETSURFACE "get_surface() -> Surface\nget a reference to the currently set display surface" +#define DOC_PYGAMEDISPLAYGETSURFACE "get_surface() -> Surface\nGet a reference to the currently set display surface" -#define DOC_PYGAMEDISPLAYFLIP "flip() -> None\nupdate the full display Surface to the screen" +#define DOC_PYGAMEDISPLAYFLIP "flip() -> None\nUpdate the full display Surface to the screen" -#define DOC_PYGAMEDISPLAYUPDATE "update(rectangle=None) -> None\nupdate(rectangle_list) -> None\nupdate portions of the screen for software displays" +#define DOC_PYGAMEDISPLAYUPDATE "update(rectangle=None) -> None\nupdate(rectangle_list) -> None\nUpdate portions of the screen for software displays" -#define DOC_PYGAMEDISPLAYGETDRIVER "get_driver() -> name\nget the name of the pygame display backend" +#define DOC_PYGAMEDISPLAYGETDRIVER "get_driver() -> name\nGet the name of the pygame display backend" #define DOC_PYGAMEDISPLAYINFO "Info() -> VideoInfo\nCreate a video display information object" #define DOC_PYGAMEDISPLAYGETWMINFO "get_wm_info() -> dict\nGet information about the current windowing system" -#define DOC_PYGAMEDISPLAYLISTMODES "list_modes(depth=0, flags=pygame.FULLSCREEN) -> list\nget list of available fullscreen modes" +#define DOC_PYGAMEDISPLAYLISTMODES "list_modes(depth=0, flags=pygame.FULLSCREEN) -> list\nGet list of available fullscreen modes" -#define DOC_PYGAMEDISPLAYMODEOK "mode_ok(size, flags=0, depth=0) -> depth\npick the best color depth for a display mode" +#define DOC_PYGAMEDISPLAYMODEOK "mode_ok(size, flags=0, depth=0) -> depth\nPick the best color depth for a display mode" -#define DOC_PYGAMEDISPLAYGLGETATTRIBUTE "gl_get_attribute(flag) -> value\nget the value for an opengl flag for the current display" +#define DOC_PYGAMEDISPLAYGLGETATTRIBUTE "gl_get_attribute(flag) -> value\nGet the value for an OpenGL flag for the current display" -#define DOC_PYGAMEDISPLAYGLSETATTRIBUTE "gl_set_attribute(flag, value) -> None\nrequest an opengl display attribute for the display mode" +#define DOC_PYGAMEDISPLAYGLSETATTRIBUTE "gl_set_attribute(flag, value) -> None\nRequest an OpenGL display attribute for the display mode" -#define DOC_PYGAMEDISPLAYGETACTIVE "get_active() -> bool\ntrue when the display is active on the display" +#define DOC_PYGAMEDISPLAYGETACTIVE "get_active() -> bool\nReturns True when the display is active on the display" -#define DOC_PYGAMEDISPLAYICONIFY "iconify() -> bool\niconify the display surface" +#define DOC_PYGAMEDISPLAYICONIFY "iconify() -> bool\nIconify the display surface" -#define DOC_PYGAMEDISPLAYTOGGLEFULLSCREEN "toggle_fullscreen() -> bool\nswitch between fullscreen and windowed displays" +#define DOC_PYGAMEDISPLAYTOGGLEFULLSCREEN "toggle_fullscreen() -> bool\nSwitch between fullscreen and windowed displays" -#define DOC_PYGAMEDISPLAYSETGAMMA "set_gamma(red, green=None, blue=None) -> bool\nchange the hardware gamma ramps" +#define DOC_PYGAMEDISPLAYSETGAMMA "set_gamma(red, green=None, blue=None) -> bool\nChange the hardware gamma ramps" -#define DOC_PYGAMEDISPLAYSETGAMMARAMP "set_gamma_ramp(red, green, blue) -> bool\nchange the hardware gamma ramps with a custom lookup" +#define DOC_PYGAMEDISPLAYSETGAMMARAMP "set_gamma_ramp(red, green, blue) -> bool\nChange the hardware gamma ramps with a custom lookup" -#define DOC_PYGAMEDISPLAYSETICON "set_icon(Surface) -> None\nchange the system image for the display window" +#define DOC_PYGAMEDISPLAYSETICON "set_icon(Surface) -> None\nChange the system image for the display window" -#define DOC_PYGAMEDISPLAYSETCAPTION "set_caption(title, icontitle=None) -> None\nset the current window caption" +#define DOC_PYGAMEDISPLAYSETCAPTION "set_caption(title, icontitle=None) -> None\nSet the current window caption" -#define DOC_PYGAMEDISPLAYGETCAPTION "get_caption() -> (title, icontitle)\nget the current window caption" +#define DOC_PYGAMEDISPLAYGETCAPTION "get_caption() -> (title, icontitle)\nGet the current window caption" -#define DOC_PYGAMEDISPLAYSETPALETTE "set_palette(palette=None) -> None\nset the display color palette for indexed displays" +#define DOC_PYGAMEDISPLAYSETPALETTE "set_palette(palette=None) -> None\nSet the display color palette for indexed displays" @@ -58,36 +58,36 @@ pygame.display.init init() -> None -initialize the display module +Initialize the display module pygame.display.quit quit() -> None -uninitialize the display module +Uninitialize the display module pygame.display.get_init get_init() -> bool -true if the display module is initialized +Returns True if the display module has been initialized pygame.display.set_mode set_mode(resolution=(0,0), flags=0, depth=0) -> Surface -initialize a window or screen for display +Initialize a window or screen for display pygame.display.get_surface get_surface() -> Surface -get a reference to the currently set display surface +Get a reference to the currently set display surface pygame.display.flip flip() -> None -update the full display Surface to the screen +Update the full display Surface to the screen pygame.display.update update(rectangle=None) -> None update(rectangle_list) -> None -update portions of the screen for software displays +Update portions of the screen for software displays pygame.display.get_driver get_driver() -> name -get the name of the pygame display backend +Get the name of the pygame display backend pygame.display.Info Info() -> VideoInfo @@ -99,54 +99,54 @@ pygame.display.list_modes list_modes(depth=0, flags=pygame.FULLSCREEN) -> list -get list of available fullscreen modes +Get list of available fullscreen modes pygame.display.mode_ok mode_ok(size, flags=0, depth=0) -> depth -pick the best color depth for a display mode +Pick the best color depth for a display mode pygame.display.gl_get_attribute gl_get_attribute(flag) -> value -get the value for an opengl flag for the current display +Get the value for an OpenGL flag for the current display pygame.display.gl_set_attribute gl_set_attribute(flag, value) -> None -request an opengl display attribute for the display mode +Request an OpenGL display attribute for the display mode pygame.display.get_active get_active() -> bool -true when the display is active on the display +Returns True when the display is active on the display pygame.display.iconify iconify() -> bool -iconify the display surface +Iconify the display surface pygame.display.toggle_fullscreen toggle_fullscreen() -> bool -switch between fullscreen and windowed displays +Switch between fullscreen and windowed displays pygame.display.set_gamma set_gamma(red, green=None, blue=None) -> bool -change the hardware gamma ramps +Change the hardware gamma ramps pygame.display.set_gamma_ramp set_gamma_ramp(red, green, blue) -> bool -change the hardware gamma ramps with a custom lookup +Change the hardware gamma ramps with a custom lookup pygame.display.set_icon set_icon(Surface) -> None -change the system image for the display window +Change the system image for the display window pygame.display.set_caption set_caption(title, icontitle=None) -> None -set the current window caption +Set the current window caption pygame.display.get_caption get_caption() -> (title, icontitle) -get the current window caption +Get the current window caption pygame.display.set_palette set_palette(palette=None) -> None -set the display color palette for indexed displays +Set the display color palette for indexed displays */ \ No newline at end of file
--- a/src/doc/joystick_doc.h Sat Mar 30 14:43:51 2013 +0100 +++ b/src/doc/joystick_doc.h Sat Mar 30 14:50:49 2013 +0100 @@ -1,15 +1,15 @@ /* Auto generated file: with makeref.py . Docs go in src/ *.doc . */ -#define DOC_PYGAMEJOYSTICK "pygame module for interacting with joystick devices" +#define DOC_PYGAMEJOYSTICK "Pygame module for interacting with joysticks, gamepads, and trackballs." -#define DOC_PYGAMEJOYSTICKINIT "init() -> None\ninitialize the joystick module" +#define DOC_PYGAMEJOYSTICKINIT "init() -> None\nInitialize the joystick module." -#define DOC_PYGAMEJOYSTICKQUIT "quit() -> None\nuninitialize the joystick module" +#define DOC_PYGAMEJOYSTICKQUIT "quit() -> None\nUninitialize the joystick module." -#define DOC_PYGAMEJOYSTICKGETINIT "get_init() -> bool\ntrue if the joystick module is initialized" +#define DOC_PYGAMEJOYSTICKGETINIT "get_init() -> bool\nReturns True if the joystick module is initialized." -#define DOC_PYGAMEJOYSTICKGETCOUNT "get_count() -> count\nnumber of joysticks on the system" +#define DOC_PYGAMEJOYSTICKGETCOUNT "get_count() -> count\nReturns the number of joysticks." -#define DOC_PYGAMEJOYSTICKJOYSTICK "Joystick(id) -> Joystick\ncreate a new Joystick object" +#define DOC_PYGAMEJOYSTICKJOYSTICK "Joystick(id) -> Joystick\nCreate a new Joystick object." #define DOC_JOYSTICKINIT "init() -> None\ninitialize the Joystick" @@ -44,27 +44,27 @@ /* pygame.joystick -pygame module for interacting with joystick devices +Pygame module for interacting with joysticks, gamepads, and trackballs. pygame.joystick.init init() -> None -initialize the joystick module +Initialize the joystick module. pygame.joystick.quit quit() -> None -uninitialize the joystick module +Uninitialize the joystick module. pygame.joystick.get_init get_init() -> bool -true if the joystick module is initialized +Returns True if the joystick module is initialized. pygame.joystick.get_count get_count() -> count -number of joysticks on the system +Returns the number of joysticks. pygame.joystick.Joystick Joystick(id) -> Joystick -create a new Joystick object +Create a new Joystick object. pygame.joystick.Joystick.init init() -> None
--- a/src/doc/sprite_doc.h Sat Mar 30 14:43:51 2013 +0100 +++ b/src/doc/sprite_doc.h Sat Mar 30 14:50:49 2013 +0100 @@ -1,7 +1,7 @@ /* Auto generated file: with makeref.py . Docs go in src/ *.doc . */ #define DOC_PYGAMESPRITE "pygame module with basic game object classes" -#define DOC_PYGAMESPRITESPRITE "Sprite(*groups) -> Sprite\nsimple base class for visible game objects" +#define DOC_PYGAMESPRITESPRITE "Sprite(*groups) -> Sprite\nSimple base class for visible game objects." #define DOC_SPRITEUPDATE "update(*args) -> None\nmethod to control sprite behavior" @@ -15,9 +15,9 @@ #define DOC_SPRITEGROUPS "groups() -> group_list\nlist of Groups that contain this Sprite" -#define DOC_PYGAMESPRITEDIRTYSPRITE "DirtySprite(*groups) -> DirtySprite\na more featureful subclass of Sprite with more attributes" +#define DOC_PYGAMESPRITEDIRTYSPRITE "DirtySprite(*groups) -> DirtySprite\nA subclass of Sprite with more attributes and features." -#define DOC_PYGAMESPRITEGROUP "Group(*sprites) -> Group\ncontainer class for many Sprites" +#define DOC_PYGAMESPRITEGROUP "Group(*sprites) -> Group\nA container class to hold and manage multiple Sprite objects." #define DOC_GROUPSPRITES "sprites() -> sprite_list\nlist of the Sprites this Group contains" @@ -37,17 +37,17 @@ #define DOC_GROUPEMPTY "empty() -> None\nremove all Sprites" -#define DOC_PYGAMESPRITERENDERPLAIN "" +#define DOC_PYGAMESPRITERENDERPLAIN "Same as pygame.sprite.Group" -#define DOC_PYGAMESPRITERENDERCLEAR "" +#define DOC_PYGAMESPRITERENDERCLEAR "Same as pygame.sprite.Group" -#define DOC_PYGAMESPRITERENDERUPDATES "RenderUpdates(*sprites) -> RenderUpdates\nGroup class that tracks dirty updates" +#define DOC_PYGAMESPRITERENDERUPDATES "RenderUpdates(*sprites) -> RenderUpdates\nGroup sub-class that tracks dirty updates." #define DOC_RENDERUPDATESDRAW "draw(surface) -> Rect_list\nblit the Sprite images and track changed areas" -#define DOC_PYGAMESPRITEORDEREDUPDATES "OrderedUpdates(*spites) -> OrderedUpdates\nRenderUpdates class that draws Sprites in order of addition" +#define DOC_PYGAMESPRITEORDEREDUPDATES "OrderedUpdates(*spites) -> OrderedUpdates\nRenderUpdates sub-class that draws Sprites in order of addition." -#define DOC_PYGAMESPRITELAYEREDUPDATES "LayeredUpdates(*spites, **kwargs) -> LayeredUpdates\nLayeredUpdates Group handles layers, that draws like OrderedUpdates." +#define DOC_PYGAMESPRITELAYEREDUPDATES "LayeredUpdates(*spites, **kwargs) -> LayeredUpdates\nLayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates." #define DOC_LAYEREDUPDATESADD "add(*sprites, **kwargs) -> None\nadd a sprite or sequence of sprites to a group" @@ -81,7 +81,7 @@ #define DOC_LAYEREDUPDATESSWITCHLAYER "switch_layer(layer1_nr, layer2_nr) -> None\nswitches the sprites from layer1 to layer2" -#define DOC_PYGAMESPRITELAYEREDDIRTY "LayeredDirty(*spites, **kwargs) -> LayeredDirty\nLayeredDirty Group is for DirtySprites. Subclasses LayeredUpdates." +#define DOC_PYGAMESPRITELAYEREDDIRTY "LayeredDirty(*spites, **kwargs) -> LayeredDirty\nLayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates." #define DOC_LAYEREDDIRTYDRAW "draw(surface, bgd=None) -> Rect_list\ndraw all sprites in the right order onto the passed surface." @@ -97,23 +97,23 @@ #define DOC_LAYEREDDIRTYSETTIMINGTRESHOLD "set_timing_treshold(time_ms) -> None\nsets the treshold in milliseconds" -#define DOC_PYGAMESPRITEGROUPSINGLE "GroupSingle(sprite=None) -> GroupSingle\nGroup container that holds a single Sprite" +#define DOC_PYGAMESPRITEGROUPSINGLE "GroupSingle(sprite=None) -> GroupSingle\nGroup container that holds a single sprite." -#define DOC_PYGAMESPRITESPRITECOLLIDE "spritecollide(sprite, group, dokill, collided = None) -> Sprite_list\nfind Sprites in a Group that intersect another Sprite" +#define DOC_PYGAMESPRITESPRITECOLLIDE "spritecollide(sprite, group, dokill, collided = None) -> Sprite_list\nFind sprites in a group that intersect another sprite." -#define DOC_PYGAMESPRITECOLLIDERECT "collide_rect(left, right) -> bool\ncollision detection between two sprites, using rects." +#define DOC_PYGAMESPRITECOLLIDERECT "collide_rect(left, right) -> bool\nCollision detection between two sprites, using rects." -#define DOC_PYGAMESPRITECOLLIDERECTRATIO "collide_rect_ratio(ratio) -> collided_callable\ncollision detection between two sprites, using rects scaled to a ratio." +#define DOC_PYGAMESPRITECOLLIDERECTRATIO "collide_rect_ratio(ratio) -> collided_callable\nCollision detection between two sprites, using rects scaled to a ratio." -#define DOC_PYGAMESPRITECOLLIDECIRCLE "collide_circle(left, right) -> bool\ncollision detection between two sprites, using circles." +#define DOC_PYGAMESPRITECOLLIDECIRCLE "collide_circle(left, right) -> bool\nCollision detection between two sprites, using circles." -#define DOC_PYGAMESPRITECOLLIDECIRCLERATIO "collide_circle_ratio(ratio) -> collided_callable\ncollision detection between two sprites, using circles scaled to a ratio." +#define DOC_PYGAMESPRITECOLLIDECIRCLERATIO "collide_circle_ratio(ratio) -> collided_callable\nCollision detection between two sprites, using circles scaled to a ratio." -#define DOC_PYGAMESPRITECOLLIDEMASK "collide_mask(SpriteLeft, SpriteRight) -> point\ncollision detection between two sprites, using masks." +#define DOC_PYGAMESPRITECOLLIDEMASK "collide_mask(SpriteLeft, SpriteRight) -> point\nCollision detection between two sprites, using masks." -#define DOC_PYGAMESPRITEGROUPCOLLIDE "groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict\nfind all Sprites that collide between two Groups" +#define DOC_PYGAMESPRITEGROUPCOLLIDE "groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict\nFind all sprites that collide between two groups." -#define DOC_PYGAMESPRITESPRITECOLLIDEANY "spritecollideany(sprite, group, collided = None) -> Sprite\nspritecollideany(sprite, group, collided = None) -> None\nsimple test if a Sprite intersects anything in a Group" +#define DOC_PYGAMESPRITESPRITECOLLIDEANY "spritecollideany(sprite, group, collided = None) -> Sprite\nspritecollideany(sprite, group, collided = None) -> None\nSimple test if a sprite intersects anything in a group." @@ -126,7 +126,7 @@ pygame.sprite.Sprite Sprite(*groups) -> Sprite -simple base class for visible game objects +Simple base class for visible game objects. pygame.sprite.Sprite.update update(*args) -> None @@ -154,11 +154,11 @@ pygame.sprite.DirtySprite DirtySprite(*groups) -> DirtySprite -a more featureful subclass of Sprite with more attributes +A subclass of Sprite with more attributes and features. pygame.sprite.Group Group(*sprites) -> Group -container class for many Sprites +A container class to hold and manage multiple Sprite objects. pygame.sprite.Group.sprites sprites() -> sprite_list @@ -197,14 +197,14 @@ remove all Sprites pygame.sprite.RenderPlain - +Same as pygame.sprite.Group pygame.sprite.RenderClear - +Same as pygame.sprite.Group pygame.sprite.RenderUpdates RenderUpdates(*sprites) -> RenderUpdates -Group class that tracks dirty updates +Group sub-class that tracks dirty updates. pygame.sprite.RenderUpdates.draw draw(surface) -> Rect_list @@ -212,11 +212,11 @@ pygame.sprite.OrderedUpdates OrderedUpdates(*spites) -> OrderedUpdates -RenderUpdates class that draws Sprites in order of addition +RenderUpdates sub-class that draws Sprites in order of addition. pygame.sprite.LayeredUpdates LayeredUpdates(*spites, **kwargs) -> LayeredUpdates -LayeredUpdates Group handles layers, that draws like OrderedUpdates. +LayeredUpdates is a sprite group that handles layers and draws like OrderedUpdates. pygame.sprite.LayeredUpdates.add add(*sprites, **kwargs) -> None @@ -284,7 +284,7 @@ pygame.sprite.LayeredDirty LayeredDirty(*spites, **kwargs) -> LayeredDirty -LayeredDirty Group is for DirtySprites. Subclasses LayeredUpdates. +LayeredDirty group is for DirtySprite objects. Subclasses LayeredUpdates. pygame.sprite.LayeredDirty.draw draw(surface, bgd=None) -> Rect_list @@ -316,39 +316,39 @@ pygame.sprite.GroupSingle GroupSingle(sprite=None) -> GroupSingle -Group container that holds a single Sprite +Group container that holds a single sprite. pygame.sprite.spritecollide spritecollide(sprite, group, dokill, collided = None) -> Sprite_list -find Sprites in a Group that intersect another Sprite +Find sprites in a group that intersect another sprite. pygame.sprite.collide_rect collide_rect(left, right) -> bool -collision detection between two sprites, using rects. +Collision detection between two sprites, using rects. pygame.sprite.collide_rect_ratio collide_rect_ratio(ratio) -> collided_callable -collision detection between two sprites, using rects scaled to a ratio. +Collision detection between two sprites, using rects scaled to a ratio. pygame.sprite.collide_circle collide_circle(left, right) -> bool -collision detection between two sprites, using circles. +Collision detection between two sprites, using circles. pygame.sprite.collide_circle_ratio collide_circle_ratio(ratio) -> collided_callable -collision detection between two sprites, using circles scaled to a ratio. +Collision detection between two sprites, using circles scaled to a ratio. pygame.sprite.collide_mask collide_mask(SpriteLeft, SpriteRight) -> point -collision detection between two sprites, using masks. +Collision detection between two sprites, using masks. pygame.sprite.groupcollide groupcollide(group1, group2, dokill1, dokill2, collided = None) -> Sprite_dict -find all Sprites that collide between two Groups +Find all sprites that collide between two groups. pygame.sprite.spritecollideany spritecollideany(sprite, group, collided = None) -> Sprite spritecollideany(sprite, group, collided = None) -> None -simple test if a Sprite intersects anything in a Group +Simple test if a sprite intersects anything in a group. */ \ No newline at end of file
