diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-09-24 13:19:31 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-09-24 13:19:31 (GMT) |
commit | d85f9a04075107e799d7a748bbbc96f7f43ae73e (patch) | |
tree | 6bf68d80ccb80dc4d3e89d78160c51dd4675bb44 /playerscoreboard.py | |
parent | 7b8800191ad29440393ce1649a7d82419ef6fa5f (diff) | |
parent | e3af6ee47390ac2bde75a6c31f85c091fdc3bce2 (diff) |
Merge branch 'develop'
Diffstat (limited to 'playerscoreboard.py')
-rwxr-xr-x | playerscoreboard.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/playerscoreboard.py b/playerscoreboard.py index 2526917..32bf551 100755 --- a/playerscoreboard.py +++ b/playerscoreboard.py @@ -54,12 +54,7 @@ class PlayerScoreboard(gtk.EventBox): self.icon = svglabel.SvgLabel(self.xo_buddy, fill_color, stroke_color, False, self.current_color, 45, 55) # Set waiting buddy icon - self.waiting_icon = svglabel.SvgLabel(self.xo_buddy, self.default_color, '#ffffff', False, self.current_color, 45, 55) - - # Cache the score icon - score_label = Score(fill_color, stroke_color) - self.score_pixbuf_unsel = score_label.get_pixbuf() - self.score_pixbuf_sel = score_label.get_pixbuf_sel() + #self.waiting_icon = svglabel.SvgLabel(self.xo_buddy, self.default_color, '#ffffff', False, self.current_color, 45, 55) # Set nick label self.nick = gtk.Label(nick) @@ -68,10 +63,10 @@ class PlayerScoreboard(gtk.EventBox): self.nick.set_alignment(0, 0.5) # Set message label - self.msg = gtk.Label('Waiting for next game...') - self.msg.modify_font(pango.FontDescription("12")) - self.msg.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#ffffff')) - self.msg.set_alignment(0, 0.5) + #self.msg = gtk.Label('Waiting for next game...') + #self.msg.modify_font(pango.FontDescription("12")) + #self.msg.modify_fg(gtk.STATE_NORMAL, gtk.gdk.color_parse('#ffffff')) + #self.msg.set_alignment(0, 0.5) self.add(self.table) self.table.attach(self.icon, 0, 1, 0, 1) @@ -82,6 +77,12 @@ class PlayerScoreboard(gtk.EventBox): self.increase_score() def increase_score(self): + if len(self.scores) == 0: + # Cache the score icon + score_label = Score(self.fill_color, self.stroke_color) + self.score_pixbuf_unsel = score_label.get_pixbuf() + self.score_pixbuf_sel = score_label.get_pixbuf_sel() + new_score = Score(self.fill_color, self.stroke_color, self.score_pixbuf_sel, self.score_pixbuf_unsel,self.status) self.scores.append(new_score) new_score.show() |