Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofert97@gmail.com>2013-04-30 22:06:18 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2013-04-30 22:06:18 (GMT)
commit081ca9948febebce225a7169715d9bbcc13831b2 (patch)
tree18cea91abaaa4a1ce042712b1f226b3dd82b3a98
parent7fd01035aa50782291356ede33c493263d8960fe (diff)
Add the fuction _get_route
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
-rw-r--r--game.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/game.py b/game.py
index dfc5153..82c276c 100644
--- a/game.py
+++ b/game.py
@@ -35,11 +35,6 @@ LINE_WIDTH = 12
BACKGROUND_COLOR = (0, 1, 0)
class Canvas(Gtk.DrawingArea):
-
- __gsignals__ = {'cross-added': (GObject.SignalFlags.RUN_FIRST, None, [int]),
- 'circle-added': (GObject.SignalFlags.RUN_FIRST,
- None, [int])}
-
def __init__(self):
GObject.GObject.__init__(self)
@@ -57,4 +52,13 @@ class Canvas(Gtk.DrawingArea):
context.set_source_rgb(*BACKGROUND_COLOR)
context.fill()
+ def _get_route(self, direction, pos_x, pos_y):
+ if direction == 'horizontal':
+ x = alloc.width
+ else:
+ x = alloc.height
+
+ context.rectangle(pos_x, pos_y, x, 50)
+ context.set_source_rgb(0.803921569, 0.788235294, 0.788235294)
+ context.fill()