comparison orpg/gametree/nodehandlers/forms.py @ 180:12ba14d30baa alpha

Traipse Alpha 'OpenRPG' {100115-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 (Keeping up with Beta) New Features: Added Bookmarks Added 'boot' command to remote admin Added confirmation window for sent nodes Minor changes to allow for portability to an OpenSUSE linux OS Miniatures Layer pop up box allows users to turn off Mini labels, from FlexiRPG Zoom Mouse plugin added Images added to Plugin UI Switching to Element Tree Map efficiency, from FlexiRPG Added Status Bar to Update Manager New TrueDebug Class in orpg_log (See documentation for usage) Portable Mercurial Tip of the Day added, from Core and community New Reference Syntax added for custom PC sheets New Child Reference for gametree New Parent Reference for gametree New Gametree Recursion method, mapping, context sensitivity, and effeciency.. New Features node with bonus nodes and Node Referencing help added Dieroller structure from Core New DieRoller portability for odd Dice Added 7th Sea die roller; ie [7k3] = [7d10.takeHighest(3).open(10)] New 'Mythos' System die roller added Added new vs. die roller method for WoD; ie [3v3] = [3d10.vs(3)]. Included for Mythos roller also New Warhammer FRPG Die Roller (Special thanks to Puu-san for the support) New EZ_Tree Reference system. Push a button, Traipse the tree, get a reference (Beta!) Fixes: Fix to Text based Server Fix to Remote Admin Commands Fix to Pretty Print, from Core Fix to Splitter Nodes not being created Fix to massive amounts of images loading, from Core Fix to Map from gametree not showing to all clients Fix to gametree about menus Fix to Password Manager check on startup Fix to PC Sheets from tool nodes. They now use the tabber_panel Fix to Whiteboard ID to prevent random line or text deleting. Fixes to Server, Remote Server, and Server GUI Fix to Update Manager; cleaner clode for saved repositories Fixes made to Settings Panel and now reactive settings when Ok is pressed Fixes to Alternity roller's attack roll. Uses a simple Tuple instead of a Splice Fix to Use panel of Forms and Tabbers. Now longer enters design mode Fix made Image Fetching. New fetching image and new failed image Modified ID's to prevent non updated clients from ruining the fix. default_manifest.xml renamed to default_upmana.xml
author sirebral
date Fri, 15 Jan 2010 00:09:39 -0600
parents ff19dd30064b
children fa18af3e04b9
comparison
equal deleted inserted replaced
179:5609ac142298 180:12ba14d30baa
254 parent.SetSize(self.GetBestSize()) 254 parent.SetSize(self.GetBestSize())
255 self.Bind(wx.EVT_TEXT, self.on_text, id=FORM_TEXT_CTRL) 255 self.Bind(wx.EVT_TEXT, self.on_text, id=FORM_TEXT_CTRL)
256 self.Bind(wx.EVT_BUTTON, self.on_send, id=FORM_SEND_BUTTON) 256 self.Bind(wx.EVT_BUTTON, self.on_send, id=FORM_SEND_BUTTON)
257 257
258 def on_text(self, evt): 258 def on_text(self, evt):
259 debug()
260 txt = self.text.GetValue() 259 txt = self.text.GetValue()
261 #txt = strip_text(txt) ##Does not seem to exist. 260 #txt = strip_text(txt) ##Does not seem to exist.
262 self.handler.text_elem.text = txt 261 self.handler.text_elem.text = txt
263 262
264 def on_send(self, evt): 263 def on_send(self, evt):
287 286
288 class textctrl_edit_panel(wx.Panel): 287 class textctrl_edit_panel(wx.Panel):
289 def __init__(self, parent, handler): 288 def __init__(self, parent, handler):
290 wx.Panel.__init__(self, parent, -1) 289 wx.Panel.__init__(self, parent, -1)
291 self.handler = handler 290 self.handler = handler
291 self.parent = parent
292 sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "Text Properties"), wx.VERTICAL) 292 sizer = wx.StaticBoxSizer(wx.StaticBox(self, -1, "Text Properties"), wx.VERTICAL)
293 293
294 self.title = wx.TextCtrl(self, P_TITLE, handler.xml.get('name')) 294 self.title = wx.TextCtrl(self, P_TITLE, handler.xml.get('name'))
295 self.multi = wx.CheckBox(self, F_MULTI, " Multi-Line") 295 self.multi = wx.CheckBox(self, F_MULTI, " Multi-Line")
296 self.multi.SetValue(handler.is_multi_line()) 296 self.multi.SetValue(handler.is_multi_line())
330 self.Bind(wx.EVT_CHECKBOX, self.on_button, id=F_MULTI) 330 self.Bind(wx.EVT_CHECKBOX, self.on_button, id=F_MULTI)
331 self.Bind(wx.EVT_CHECKBOX, self.on_raw_button, id=F_RAW_SEND) 331 self.Bind(wx.EVT_CHECKBOX, self.on_raw_button, id=F_RAW_SEND)
332 self.Bind(wx.EVT_CHECKBOX, self.on_hide_button, id=F_HIDE_TITLE) 332 self.Bind(wx.EVT_CHECKBOX, self.on_hide_button, id=F_HIDE_TITLE)
333 self.Bind(wx.EVT_CHECKBOX, self.on_send_button, id=F_SEND_BUTTON) 333 self.Bind(wx.EVT_CHECKBOX, self.on_send_button, id=F_SEND_BUTTON)
334 self.Bind(wx.EVT_BUTTON, self.on_reference, id=T_BUT_REF) 334 self.Bind(wx.EVT_BUTTON, self.on_reference, id=T_BUT_REF)
335 self.parent.Bind(wx.EVT_CLOSE, self.tree_failsafe)
335 336
336 ## EZ_Tree Core TaS - Prof.Ebral ## 337 ## EZ_Tree Core TaS - Prof.Ebral ##
337 def on_reference(self, evt, car=None): 338 def on_reference(self, evt, car=None):
338 self.do_tree = wx.Frame(self, -1, 'EZ Tree') 339 self.do_tree = wx.Frame(self, -1, 'EZ Tree')
339 self.ez_tree = orpg.gametree.gametree 340 self.ez_tree = orpg.gametree.gametree
340 self.temp_wnd = self.ez_tree.game_tree(self.do_tree, self.ez_tree.EZ_REF) 341 self.temp_wnd = self.ez_tree.game_tree(self.do_tree, self.ez_tree.EZ_REF)
341 self.temp_wnd.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick) 342 self.temp_wnd.Bind(wx.EVT_LEFT_DCLICK, self.on_ldclick)
342 component.get('tree_fs').save_tree(settings.get("gametree")) 343 component.get('tree_fs').save_tree(settings.get("gametree"))
343 self.temp_wnd.load_tree(settings.get("gametree")) 344 self.temp_wnd.load_tree(settings.get("gametree"))
344 self.do_tree.Show() 345 self.do_tree.Show()
346
347 def tree_failsafe(self, evt):
348 self.parent.Destroy()
349 component.add('tree', component.get('tree_fs')) ## Backup
345 350
346 def get_grid_ref(self, obj, complete): 351 def get_grid_ref(self, obj, complete):
347 self.temp_wnd.Freeze() 352 self.temp_wnd.Freeze()
348 self.grid_ref = complete 353 self.grid_ref = complete
349 self.mini_grid = wx.Frame(self, -1, 'EZ Tree Mini Grid') 354 self.mini_grid = wx.Frame(self, -1, 'EZ Tree Mini Grid')
774 779
775 def on_add_option(self, evt): 780 def on_add_option(self, evt):
776 self.handler.add_option(self.caption_entry.GetValue(), self.value_entry.GetValue()) 781 self.handler.add_option(self.caption_entry.GetValue(), self.value_entry.GetValue())
777 self.reload_options() 782 self.reload_options()
778 self.dlg.Destroy() 783 self.dlg.Destroy()
784 component.add('tree', component.get('tree_fs')) ## Backup
779 return 785 return
780 786
781 ## EZ_Tree Core TaS - Prof.Ebral ## 787 ## EZ_Tree Core TaS - Prof.Ebral ##
782 def on_reference(self, evt, car=None): 788 def on_reference(self, evt, car=None):
783 self.do_tree = wx.Frame(self, -1, 'EZ Tree') 789 self.do_tree = wx.Frame(self, -1, 'EZ Tree')
849 def on_edit_ok(self, evt): 855 def on_edit_ok(self, evt):
850 self.handler.edit_caption(self.index, self.caption_entry.GetValue()) 856 self.handler.edit_caption(self.index, self.caption_entry.GetValue())
851 self.handler.edit_option(self.index, self.value_entry.GetValue()) 857 self.handler.edit_option(self.index, self.value_entry.GetValue())
852 self.reload_options() 858 self.reload_options()
853 self.dlg.Destroy() 859 self.dlg.Destroy()
854 #component.add('tree', component.get('tree_fs')) ## Backup 860 component.add('tree', component.get('tree_fs')) ## Backup
855 return 861 return
856 862
857 def on_edit_cancel(self, evt): 863 def on_edit_cancel(self, evt):
858 self.dlg.Destroy() 864 self.dlg.Destroy()
859 #component.add('tree', component.get('tree_fs')) ## Backup 865 component.add('tree', component.get('tree_fs')) ## Backup
860 return 866 return
861 867
862 def on_remove(self,evt): 868 def on_remove(self,evt):
863 index = self.listbox.GetSelection() 869 index = self.listbox.GetSelection()
864 if index >= 0: 870 if index >= 0: