Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game.py
diff options
context:
space:
mode:
authorCristhofer Travieso <cristhofert97@gmail.com>2013-07-23 21:55:44 (GMT)
committer Cristhofer Travieso <cristhofert97@gmail.com>2013-07-23 21:55:44 (GMT)
commit306db77d94eaa00e46ea85f5879486055a78c9f6 (patch)
tree7bc49ad4fd8fd2eeefd6653bd14579b9d0550417 /game.py
parent259b0e063676ca70b7e2f3dcb3eb8c70fb7804e1 (diff)
Add image deck
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
Diffstat (limited to 'game.py')
-rw-r--r--game.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/game.py b/game.py
index acbde8c..825c513 100644
--- a/game.py
+++ b/game.py
@@ -19,6 +19,7 @@
from gi.repository import Gtk
from gi.repository import Gdk
from gi.repository import GObject
+import os
WIDTH = 1200
HEIGHT = 700
@@ -38,6 +39,7 @@ class Fixed(Gtk.Fixed):
def __init__(self):
Gtk.Fixed.__init__(self)
+ card_dir = '/home/cristhofer/prog/truco/icons/cards'
#opponent cards
opponent_card1 = Card()
self.put(opponent_card1, WIDTH/2, 0)
@@ -65,9 +67,9 @@ class Fixed(Gtk.Fixed):
#deck
deck = Gtk.Image()
+ deck.set_from_file(card_dir + '/back.svg')
self.put(deck, 0, 50)
- self.show()
-
+
#button
box = Gtk.VBox()
self.put(box, WIDTH-100, HEIGHT-100)
@@ -90,8 +92,7 @@ class Fixed(Gtk.Fixed):
flor_btn = Gtk.Button('Flor')
other_box.add(flor_btn)
- box.show_all()
- self.show()
+ self.show_all()
def deal(self):
pass