diff options
-rw-r--r-- | game.py | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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() |