comparison orpg/gametree/nodehandlers/containers.py @ 173:0dde29a41614 alpha

Traipse Alpha 'OpenRPG' {100107-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 Added 7th Sea die roller method; 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)]. Includes support for Mythos roller New EZ_Tree Reference system. Push a button, Traipse the tree, get a reference (Alpha!!) 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 Fixed Whiteboard ID to prevent random line or text deleting. Modified ID's to prevent non updated clients from ruining the fix. default_manifest.xml renamed to default_upmana.xml Fix to Update Manager; cleaner clode for saved repositories Fixes made to Settings Panel and no 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
author sirebral
date Thu, 07 Jan 2010 01:53:12 -0600
parents bf799efe7a8a
children fa18af3e04b9
comparison
equal deleted inserted replaced
170:b7206781c254 173:0dde29a41614
103 container_handler.__init__(self, xml, tree_node) 103 container_handler.__init__(self, xml, tree_node)
104 104
105 def load_children(self): 105 def load_children(self):
106 self.atts = None 106 self.atts = None
107 for child_xml in self.xml: 107 for child_xml in self.xml:
108 if child_xml.get == "group_atts": #having the group attributes as a child is bad! 108 if child_xml.tag == "group_atts": #having the group attributes as a child is bad!
109 self.xml.remove(child_xml) 109 self.xml.remove(child_xml)
110 elif child_xml: self.tree.load_xml(child_xml, self.mytree_node) 110 elif child_xml: self.tree.load_xml(child_xml, self.mytree_node)
111 if not self.xml.get('cols'): self.xml.set('cols', '1') 111 if not self.xml.get('cols'): self.xml.set('cols', '1')
112 if not self.xml.get('border'): self.xml.set('border', '1') 112 if not self.xml.get('border'): self.xml.set('border', '1')
113 113
199 199
200 def __init__(self, xml, tree_node): 200 def __init__(self, xml, tree_node):
201 container_handler.__init__(self, xml, tree_node) 201 container_handler.__init__(self, xml, tree_node)
202 202
203 def get_design_panel(self,parent): 203 def get_design_panel(self,parent):
204 return tabbed_edit_panel(parent, self) 204 return tabbed_panel(parent, self, 1)
205 205
206 def get_use_panel(self,parent): 206 def get_use_panel(self,parent):
207 return tabbed_panel(parent, self, 1) 207 return tabbed_panel(parent, self, 0)
208 208
209 209
210 class tabbed_panel(orpgTabberWnd): 210 class tabbed_panel(orpgTabberWnd):
211 def __init__(self, parent, handler, mode): 211 def __init__(self, parent, handler, mode):
212 orpgTabberWnd.__init__(self, parent, style=FNB.FNB_NO_X_BUTTON) 212 orpgTabberWnd.__init__(self, parent, style=FNB.FNB_NO_X_BUTTON)
215 handler.tree.traverse(handler.mytree_node, self.pick_panel, mode, False) 215 handler.tree.traverse(handler.mytree_node, self.pick_panel, mode, False)
216 parent.SetSize(self.GetBestSize()) 216 parent.SetSize(self.GetBestSize())
217 217
218 def pick_panel(self, treenode, mode): 218 def pick_panel(self, treenode, mode):
219 node = self.handler.tree.GetPyData(treenode) 219 node = self.handler.tree.GetPyData(treenode)
220
220 if mode == 1: panel = node.get_design_panel(self) 221 if mode == 1: panel = node.get_design_panel(self)
221 else: panel = node.get_use_panel(self) 222 else: panel = node.get_use_panel(self)
222 name = node.xml.get("name") 223 name = node.xml.get("name")
223 if name == None: ## Fixes broken 3e Inventory child 224 if name == None: ## Fixes broken 3e Inventory child
224 if node.xml.tag == 'inventory': 225 if node.xml.tag == 'inventory':
260 container_handler.__init__(self,xml,tree_node) 261 container_handler.__init__(self,xml,tree_node)
261 262
262 def load_children(self): 263 def load_children(self):
263 self.atts = None 264 self.atts = None
264 for child_xml in self.xml: 265 for child_xml in self.xml:
265 if child_xml.tag == "splitter_atts": self.xml.remove(child_xml) #Same here! 266 if child_xml.tag == "splitter_atts": print 'splitter_atts exist!'; self.xml.remove(child_xml) #Same here!
266 elif child_xml: self.tree.load_xml(child_xml,self.mytree_node) 267 elif child_xml: self.tree.load_xml(child_xml,self.mytree_node)
267 if not self.xml.get('horizontal'): self.xml.set('horizontal', '0') 268 if not self.xml.get('horizontal'): self.xml.set('horizontal', '0')
268 269
269 def get_design_panel(self,parent): 270 def get_design_panel(self,parent):
270 return self.build_splitter_wnd(parent, 1) 271 return self.build_splitter_wnd(parent, 1)
271 272
272 def get_use_panel(self,parent): 273 def get_use_panel(self,parent):
273 return self.build_splitter_wnd(parent, 2) 274 return self.build_splitter_wnd(parent, 0)
274 275
275 def on_drop(self,evt): 276 def on_drop(self,evt):
276 drag_obj = self.tree.drag_obj 277 drag_obj = self.tree.drag_obj
277 container_handler.on_drop(self,evt) 278 container_handler.on_drop(self,evt)
278 279