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-06-04 18:07:34 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2013-06-04 18:07:34 (GMT)
commit1126bec1eb9716492584ecac622362b85fd202bf (patch)
tree60c460b01405493331e94882cec25813f0125605
parentc46a928d679b137088380d49e0f4426f0906e9eb (diff)
Add a fixed and set the title
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
-rw-r--r--game.py39
-rw-r--r--window.py1
2 files changed, 16 insertions, 24 deletions
diff --git a/game.py b/game.py
index feb2419..9c1f5bc 100644
--- a/game.py
+++ b/game.py
@@ -32,29 +32,20 @@ LINE_WIDTH = 12
BACKGROUND_COLOR = (0, 1, 0)
-class Canvas(Gtk.DrawingArea):
-
- __gsignals__ = {
- 'update': (GObject.SIGNAL_RUN_FIRST, None, [])}
+class Canvas(Gtk.Fixed):
def __init__(self):
- GObject.GObject.__init__(self)
-
- self.cars = [[100, 100, 50, 50, "horizontal", True]]
- self.routes = [(10, "horizontal"), (200, "vertical")]
-
- self.connect('draw', self._draw_cb)
-
- self.show_all()
-
- def _draw_cb(self, widget, context):
- #redraw
-
- self.alloc = self.get_allocation()
-
- # Background
- context.rectangle(0, 0, self.alloc.width, self.alloc.height)
- context.set_source_rgb(*BACKGROUND_COLOR)
- context.fill()
-
- #Draw cards
+ Gtk.Fixed.__init__(self)
+
+ #my cards
+ card1 = Gtk.Image()
+ card2 = Gtk.Image()
+ card3 = Gtk.Image()
+
+ #enemy cards
+ enemy_card1 = Gtk.Image()
+ enemy_card2 = Gtk.Image()
+ enemy_card3 = Gtk.Image()
+
+ #deck
+ deck = Gtk.Image()
diff --git a/window.py b/window.py
index 7e11c9a..29af610 100644
--- a/window.py
+++ b/window.py
@@ -24,5 +24,6 @@ if __name__ == "__main__":
window.connect('destroy', lambda w: Gtk.main_quit())
window.add(Canvas())
window.maximize()
+ window.set_title('Truco')
window.show_all()
Gtk.main()