comparison orpg/mapper/min_dialogs.py @ 195:b633f4c64aae alpha

Traipse Alpha 'OpenRPG' {100219-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 (Patch-2) New Features: New Namespace method with two new syntaxes Fixes: Fix to Server GUI startup errors Fix to Server GUI Rooms tab updating Fix to Chat and Settings if non existant die roller is picked Fix to Dieroller and .open() used with .vs(). Successes are correctly calculated Fix to Alias Lib's Export to Tree, Open, Save features Fix to alias node, now works properly Fix to Splitter node, minor GUI cleanup
author sirebral
date Sat, 24 Apr 2010 08:37:20 -0500
parents 06f10429eedc
children
comparison
equal deleted inserted replaced
182:4b2884f29a72 195:b633f4c64aae
19 # 19 #
20 # File: mapper/min_dialogs.py 20 # File: mapper/min_dialogs.py
21 # Author: Chris Davis 21 # Author: Chris Davis
22 # Maintainer: 22 # Maintainer:
23 # Version: 23 # Version:
24 # $Id: min_dialogs.py,v 1.27 2006/11/13 02:23:16 digitalxero Exp $ 24 # $Id: min_dialogs.py,v Traipse 'Ornery-Orc' prof.ebral Exp $
25 # 25 #
26 # Description: This file contains some of the basic definitions for the chat 26 # Description: This file contains some of the basic definitions for the chat
27 # utilities in the orpg project. 27 # utilities in the orpg project.
28 28
29 ##----------------------------- 29 ##-----------------------------
144 if len(min_list) > 0: 144 if len(min_list) > 0:
145 for sel_rmin in min_list: 145 for sel_rmin in min_list:
146 ############# 146 #############
147 min_xml = sel_rmin.toxml(action="new") 147 min_xml = sel_rmin.toxml(action="new")
148 node_begin = "<nodehandler module='map_miniature_nodehandler' class='map_miniature_handler' name='" 148 node_begin = "<nodehandler module='map_miniature_nodehandler' class='map_miniature_handler' name='"
149
150 if sel_rmin.label: node_begin += sel_rmin.label + "'" 149 if sel_rmin.label: node_begin += sel_rmin.label + "'"
151 else: node_begin += "Unnamed Miniature'" 150 else: node_begin += "Unnamed Miniature'"
152
153 node_begin += ">" 151 node_begin += ">"
154 gametree = component.get('tree') 152 gametree = component.get('tree')
155 node_xml = node_begin + min_xml + '</nodehandler>' 153 node_xml = node_begin + min_xml + '</nodehandler>'
156 print "Sending this XML to insert_xml:" + node_xml 154 print "Sending this XML to insert_xml:" + node_xml
157 gametree.insert_xml(node_xml) 155 gametree.insert_xml(node_xml)
306 poschoicebox.Add(wx.Size(0,1)) 304 poschoicebox.Add(wx.Size(0,1))
307 poschoicebox.Add(kluge,0,0) 305 poschoicebox.Add(kluge,0,0)
308 positionbox.Add(poschoicebox,0,0) 306 positionbox.Add(poschoicebox,0,0)
309 listsizer.Add(positionbox,0, 0) 307 listsizer.Add(positionbox,0, 0)
310 self.listsizer = listsizer 308 self.listsizer = listsizer
311 #self.outline = wx.StaticBox(self,-1,"Miniature list properties")
312 #listsizer.Add(self.outline,0, wx.EXPAND)
313 self.SetSizer(listsizer) 309 self.SetSizer(listsizer)
314 self.SetAutoLayout(True) 310 self.SetAutoLayout(True)
315 self.Fit() 311 self.Fit()
316 self.Bind(wx.EVT_SPINCTRL, self.on_spin, id=POS_SPIN) 312 self.Bind(wx.EVT_SPINCTRL, self.on_spin, id=POS_SPIN)
317 self.Bind(wx.EVT_TEXT, self.on_combo_box, id=POS_COMB) 313 self.Bind(wx.EVT_TEXT, self.on_combo_box, id=POS_COMB)
318 #self.Bind(wx.EVT_SIZE, self.on_size)
319 self.Bind(wx.EVT_TEXT, self.on_text, id=MIN_LABEL) 314 self.Bind(wx.EVT_TEXT, self.on_text, id=MIN_LABEL)
320 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_HEADING) 315 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_HEADING)
321 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE) 316 self.Bind(wx.EVT_RADIOBOX, self.on_radio_box, id=MIN_FACE)
322 317
323 def on_ok(self,min): 318 def on_ok(self,min):
498 self.sizer.SetDimension(20,20,s[0]-40,s[1]-40) 493 self.sizer.SetDimension(20,20,s[0]-40,s[1]-40)
499 self.outline.SetDimensions(5,5,s[0]-10,s[1]-10) 494 self.outline.SetDimensions(5,5,s[0]-10,s[1]-10)
500 495
501 class min_edit_dialog(wx.Dialog): 496 class min_edit_dialog(wx.Dialog):
502 def __init__(self,parent,min): 497 def __init__(self,parent,min):
503 #520,265
504 wx.Dialog.__init__(self,parent,-1,"Miniature",wx.DefaultPosition,wx.Size(520,350)) 498 wx.Dialog.__init__(self,parent,-1,"Miniature",wx.DefaultPosition,wx.Size(520,350))
505 (w,h) = self.GetClientSizeTuple() 499 (w,h) = self.GetClientSizeTuple()
506 mastersizer = wx.BoxSizer(wx.VERTICAL) 500 mastersizer = wx.BoxSizer(wx.VERTICAL)
507 editor = min_edit_panel(self,min) 501 editor = min_edit_panel(self,min)
508 #editor.SetDimensions(0,0,w,h-25)
509 self.editor = editor 502 self.editor = editor
510 mastersizer.Add(editor, 1, wx.EXPAND) 503 mastersizer.Add(editor, 1, wx.EXPAND)
511 mastersizer.Add(wx.Size(10,10)) 504 mastersizer.Add(wx.Size(10,10))
512 sizer = wx.BoxSizer(wx.HORIZONTAL) 505 sizer = wx.BoxSizer(wx.HORIZONTAL)
513 sizer.Add(wx.Button(self, wx.ID_OK, "OK"), 1, wx.EXPAND) 506 sizer.Add(wx.Button(self, wx.ID_OK, "OK"), 1, wx.EXPAND)
514 sizer.Add(wx.Size(10,10)) 507 sizer.Add(wx.Size(10,10))
515 sizer.Add(wx.Button(self, wx.ID_CANCEL, "Cancel"), 1, wx.EXPAND) 508 sizer.Add(wx.Button(self, wx.ID_CANCEL, "Cancel"), 1, wx.EXPAND)
516 #sizer.SetDimension(0,h-25,w,25)
517 mastersizer.Add(sizer, 0, wx.EXPAND) 509 mastersizer.Add(sizer, 0, wx.EXPAND)
518 self.SetSizer(mastersizer) 510 self.SetSizer(mastersizer)
519 self.SetAutoLayout(True) 511 self.SetAutoLayout(True)
520 self.Fit() 512 self.Fit()
521 self.Bind(wx.EVT_BUTTON, self.on_ok, id=wx.ID_OK) 513 self.Bind(wx.EVT_BUTTON, self.on_ok, id=wx.ID_OK)
522 514
523 def on_ok(self,evt): 515 def on_ok(self,evt):
524 self.editor.update_min() 516 self.editor.update_min()
525 self.EndModal(wx.ID_OK) 517 self.EndModal(wx.ID_OK)
518