Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rayito/RtoObject.py
diff options
context:
space:
mode:
Diffstat (limited to 'rayito/RtoObject.py')
-rwxr-xr-xrayito/RtoObject.py14
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,