Mercurial > traipse_dev
comparison orpg/gametree/nodehandlers/forms.py @ 83:f38df4bf9715 alpha
Traipse Alpha 'OpenRPG' {090909-00}
Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc''s main goal is to offer more advanced features and enhance the productivity of the user.
Update Summary:
Fixes problems with Text nodes. Fixes log problem in Fog. Fixes Mini Lib loading problem. Fixes problem with whispers in Alias Lib.
Creates new Alpha Branch.
author | sirebral |
---|---|
date | Wed, 09 Sep 2009 17:11:39 -0500 |
parents | 449a8900f9ac |
children | eb1b275699c4 |
comparison
equal
deleted
inserted
replaced
82:2fa8bd6785a5 | 83:f38df4bf9715 |
---|---|
27 # | 27 # |
28 | 28 |
29 __version__ = "$Id: forms.py,v 1.53 2007/04/21 23:00:51 digitalxero Exp $" | 29 __version__ = "$Id: forms.py,v 1.53 2007/04/21 23:00:51 digitalxero Exp $" |
30 | 30 |
31 from containers import * | 31 from containers import * |
32 from orpg.orpg_xml import xml | |
32 from wx.lib.scrolledpanel import ScrolledPanel | 33 from wx.lib.scrolledpanel import ScrolledPanel |
33 | 34 |
34 def bool2int(b): | 35 def bool2int(b): |
35 #in wxPython 2.5+, evt.Checked() returns True or False instead of 1.0 or 0. | 36 #in wxPython 2.5+, evt.Checked() returns True or False instead of 1.0 or 0. |
36 #by running the results of that through this function, we convert it. | 37 #by running the results of that through this function, we convert it. |
283 self.Bind(wx.EVT_TEXT, self.on_text, id=FORM_TEXT_CTRL) | 284 self.Bind(wx.EVT_TEXT, self.on_text, id=FORM_TEXT_CTRL) |
284 self.Bind(wx.EVT_BUTTON, self.on_send, id=FORM_SEND_BUTTON) | 285 self.Bind(wx.EVT_BUTTON, self.on_send, id=FORM_SEND_BUTTON) |
285 | 286 |
286 def on_text(self,evt): | 287 def on_text(self,evt): |
287 txt = self.text.GetValue() | 288 txt = self.text.GetValue() |
288 txt = strip_text(txt) | 289 txt = xml.strip_text(txt) |
289 self.handler.text._set_nodeValue(txt) | 290 self.handler.text._set_nodeValue(txt) |
290 | 291 |
291 def on_send(self,evt): | 292 def on_send(self,evt): |
292 txt = self.text.GetValue() | 293 txt = self.text.GetValue() |
293 if not self.handler.is_raw_send(): | 294 if not self.handler.is_raw_send(): |
362 if not len(txt): return | 363 if not len(txt): return |
363 self.handler.master_dom.setAttribute('name',txt) | 364 self.handler.master_dom.setAttribute('name',txt) |
364 self.handler.rename(txt) | 365 self.handler.rename(txt) |
365 if id == F_TEXT: | 366 if id == F_TEXT: |
366 txt = self.text.GetValue() | 367 txt = self.text.GetValue() |
367 txt = strip_text(txt) | 368 txt = xml.strip_text(txt) |
368 self.handler.text._set_nodeValue(txt) | 369 self.handler.text._set_nodeValue(txt) |
369 | 370 |
370 def on_button(self,evt): | 371 def on_button(self,evt): |
371 self.handler.text_elem.setAttribute("multiline",str(bool2int(evt.Checked()))) | 372 self.handler.text_elem.setAttribute("multiline",str(bool2int(evt.Checked()))) |
372 | 373 |