Mercurial > traipse_dev
comparison orpg/mapper/map_handler.py @ 20:072ffc1d466f traipse_dev
2nd attempt. Still untested.
author | sirebral |
---|---|
date | Sat, 25 Jul 2009 19:23:25 -0500 |
parents | 78407d627cba |
children | c54768cffbd4 |
comparison
equal
deleted
inserted
replaced
19:78407d627cba | 20:072ffc1d466f |
---|---|
65 def on_apply(self, evt): | 65 def on_apply(self, evt): |
66 session=self.canvas.frame.session | 66 session=self.canvas.frame.session |
67 if (session.my_role() != session.ROLE_GM): | 67 if (session.my_role() != session.ROLE_GM): |
68 open_rpg.get_component("chat").InfoPost("You must be a GM to use this feature") | 68 open_rpg.get_component("chat").InfoPost("You must be a GM to use this feature") |
69 return | 69 return |
70 try: | 70 try: size = (int(self.width.GetValue()),int(self.height.GetValue())) |
71 size = (int(self.width.GetValue()),int(self.height.GetValue())) | 71 except: wx.MessageBox("Invalid Map Size!","Map Properties"); return |
72 except: | |
73 wx.MessageBox("Invalide Map Size!","Map Properties") | |
74 return | |
75 self.canvas.set_size(size) | 72 self.canvas.set_size(size) |
76 self.update_info() | 73 self.update_info() |
77 self.canvas.send_map_data() | 74 self.canvas.send_map_data() |
78 self.canvas.Refresh() | 75 self.canvas.Refresh() |