diff options
author | Gabriel Eirea <geirea@gmail.com> | 2012-03-10 00:00:30 (GMT) |
---|---|---|
committer | Gabriel Eirea <geirea@gmail.com> | 2012-03-10 00:00:30 (GMT) |
commit | 6280ea432758f7c9487bb48d599c86b99528c92d (patch) | |
tree | 94671d91614f6299cfc0e5ada8376723b0108c38 /rayito/RtoObject.py | |
parent | bdbef7552fcc5917991fe0a168734fe7c8674952 (diff) |
Diffstat (limited to 'rayito/RtoObject.py')
-rwxr-xr-x | rayito/RtoObject.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/rayito/RtoObject.py b/rayito/RtoObject.py index 5963f4c..1c731f3 100755 --- a/rayito/RtoObject.py +++ b/rayito/RtoObject.py @@ -52,6 +52,9 @@ class RtoObject(): def change_layer(self, new_layer): self._layer = new_layer + def get_layer(self): + return self._layer + def move_start(self, vel): # vel should be in pixels per millisecond self._moving = True @@ -83,6 +86,8 @@ class RtoImage(RtoObject): """ Class for rayito images. image: pygame surface with the image + position: (x, y) of upper-left corner in pixels + layer: layer number, high is up, low is down """ def __init__(self, image, position, layer = 0): @@ -142,10 +147,13 @@ class RtoImage(RtoObject): class RtoDialog(RtoObject): """Class for rayito dialogs - text: list with text to display; each element can have \n to separate lines + text: list with text to display; + each element can have \n to separate lines font: pygame font to use bg_color: background color (R, G, B) fg_color: text color (R, G, B) + position: (x, y) of upper-left corner in pixels + layer: layer number, high is up, low is down """ def __init__(self, text, font, bg_color, fg_color, position, layer = 0): @@ -209,6 +217,8 @@ class RtoButton(RtoObject): font: pygame font to use bg_color: background color (R, G, B) fg_color: text color (R, G, B) + position: (x, y) of upper-left corner in pixels + layer: layer number, high is up, low is down """ def __init__(self, text, font, bg_color, fg_color, position, layer = 0): @@ -262,6 +272,8 @@ class RtoSprite(RtoObject): next_frames: list with next frame from current one dxs: list with dx for current frame (in pixels) dys: list with dy for current frame (in pixels) + position: (x, y) of upper-left corner in pixels + layer: layer number, high is up, low is down """ def __init__(self, images, frames, next_frames, dxs, dys, |