Mercurial > zrpn
changeset 75:5a09a3c0a13c
merging
| author | Rene Dudfield <renesd@gmail.com> |
|---|---|
| date | Sun, 08 Jul 2012 11:44:53 +0200 |
| parents | 278328c534b7 (current diff) 840af9aa4193 (diff) |
| children | f78833197559 |
| files | |
| diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/zrpn/client.py Sun Jul 08 11:43:07 2012 +0200 +++ b/zrpn/client.py Sun Jul 08 11:44:53 2012 +0200 @@ -21,8 +21,8 @@ self.client = net.Client() self.connection = self.client.connect(address, port) self.lbl_time=sgc.Label(pos=(0,0),text="time\nwasted=\n0") - self.lbl_score=sgc.Label(pos=(0,70),text="score=0") - self.lbl_highscore = sgc.Label(pos=(0,100),text="First=0") + self.lbl_score=sgc.Label(pos=(0,70),text="score=\n0") + self.lbl_highscore = sgc.Label(pos=(0,120),text="First=\n0") w=[self.lbl_time,self.lbl_score,self.lbl_highscore] @@ -46,12 +46,12 @@ event.packet.sprites) elif event.p_type == packets.ANIMATIONS: self.display.do_animations(event.packet.animations) + elif event.p_type == packets.SCORE: + self.lbl_score.config(text="score=\n"+str(event.packet.score_num)) + self.lbl_highscore.config(text="first=\n"+str(event.packet.highscore)) self.client.step() t = time.time() - self.start - self.lbl_time.config(text="time\nwasted=\n"+str(t)) - - self.x=self.x+1 - self.lbl_score.config(text="score="+str(self.x)) + self.lbl_time.config(text="time\nwasted=\n"+str(round(t,5))) self.display.frame()
