diff options
author | Cristhofer Travieso <cristhofert97@gmail.com> | 2013-07-18 19:32:07 (GMT) |
---|---|---|
committer | Cristhofer Travieso <cristhofert97@gmail.com> | 2013-07-18 19:32:07 (GMT) |
commit | 5aa7c82f09a1593cdd9cd95cf77c0577585a2683 (patch) | |
tree | 0168dcdef4bea5aaf228ac5f03e6953908e942f5 /game.py | |
parent | 92304e0d7ab970a04bbaadba749d423a3114ea68 (diff) |
Fixing bugs of show/hide
Signed-off-by: Cristhofer Travieso <cristhofert97@gmail.com>
Diffstat (limited to 'game.py')
-rw-r--r-- | game.py | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -17,11 +17,22 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA from gi.repository import Gtk +from gi.repository import Gdk from gi.repository import GObject WIDTH = 1200 HEIGHT = 700 +class Eventbox(Gtk.EventBox): + def __init__(self): + Gtk.EventBox.__init__(self) + + parse, color = Gdk.Color.parse('green') + self.modify_bg(Gtk.StateType.NORMAL, color) + + self.add(Fixed()) + self.show() + class Fixed(Gtk.Fixed): def __init__(self): @@ -39,9 +50,11 @@ class Fixed(Gtk.Fixed): card1 = MyCard() card1.connect('clicked', self.play_card) self.put(card1, WIDTH/2, HEIGHT-10) + card2 = MyCard() card2.connect('clicked', self.play_card) self.put(card2, WIDTH/2, HEIGHT-20) + card3 = MyCard() card3.connect('clicked', self.play_card) self.put(card3, WIDTH/2, HEIGHT-30) @@ -53,11 +66,12 @@ class Fixed(Gtk.Fixed): #deck deck = Gtk.Image() self.put(deck, 0, 50) + self.show() #button box = Gtk.VBox() self.put(box, WIDTH-100, HEIGHT-100) - + truco_box = Gtk.HBox() box.add(truco_box) @@ -75,6 +89,12 @@ class Fixed(Gtk.Fixed): flor_btn = Gtk.Button('Flor') other_box.add(flor_btn) + + box.show_all() + self.show() + + def deal(self): + pass def play_card(self, widget): self.move(widget, WIDTH/2, HEIGHT/2+100) |