Mercurial > traipse_dev
comparison orpg/mapper/miniatures_handler.py @ 14:0b8b7e3ed78d traipse_dev
Adding fixes from OpenRPG 1.8.0
Includes GUI patch for Linux users, init2 plugin, cherrypy XML refrence
Completely removes approot from the startup process and creates a software
cleanup process as well.
author | sirebral |
---|---|
date | Mon, 20 Jul 2009 21:25:13 -0500 |
parents | c056e967907a |
children | 78407d627cba |
comparison
equal
deleted
inserted
replaced
13:3add6bbc3a56 | 14:0b8b7e3ed78d |
---|---|
123 base_layer_handler.build_ctrls(self) | 123 base_layer_handler.build_ctrls(self) |
124 # add controls in reverse order! (unless you want them after the default tools) | 124 # add controls in reverse order! (unless you want them after the default tools) |
125 self.auto_label_cb = wx.CheckBox(self, wx.ID_ANY, ' Auto Label ', (-1,-1),(-1,-1)) | 125 self.auto_label_cb = wx.CheckBox(self, wx.ID_ANY, ' Auto Label ', (-1,-1),(-1,-1)) |
126 self.auto_label_cb.SetValue(self.auto_label) | 126 self.auto_label_cb.SetValue(self.auto_label) |
127 self.min_url = wx.ComboBox(self, wx.ID_ANY, "http://", style=wx.CB_DROPDOWN | wx.CB_SORT) | 127 self.min_url = wx.ComboBox(self, wx.ID_ANY, "http://", style=wx.CB_DROPDOWN | wx.CB_SORT) |
128 self.localBrowse = wx.Button(self, wx.ID_ANY, 'Browse') | 128 self.localBrowse = wx.Button(self, wx.ID_ANY, 'Browse', style=wx.BU_EXACTFIT) |
129 minilist = createMaskedButton( self, orpg.dirpath.dir_struct["icon"]+'questionhead.gif', 'Edit miniature properties', wx.ID_ANY) | 129 minilist = createMaskedButton( self, orpg.dirpath.dir_struct["icon"]+'questionhead.gif', 'Edit miniature properties', wx.ID_ANY) |
130 miniadd = wx.Button(self, wx.ID_OK, "Add Miniature", style=wx.BU_EXACTFIT) | 130 miniadd = wx.Button(self, wx.ID_OK, "Add Miniature", style=wx.BU_EXACTFIT) |
131 self.sizer.Add(self.auto_label_cb,0,wx.ALIGN_CENTER) | 131 self.sizer.Add(self.auto_label_cb,0,wx.ALIGN_CENTER) |
132 self.sizer.Add((6, 0)) | |
132 self.sizer.Add(self.min_url, 1, wx.ALIGN_CENTER) | 133 self.sizer.Add(self.min_url, 1, wx.ALIGN_CENTER) |
133 self.sizer.Add(miniadd, 0, wx.EXPAND) | 134 self.sizer.Add((6, 0)) |
134 self.sizer.Add(self.localBrowse, 0, wx.EXPAND) | 135 self.sizer.Add(miniadd, 0, wx.ALIGN_CENTER) |
135 self.sizer.Add(wx.Size(20,25)) | 136 self.sizer.Add((6, 0)) |
136 self.sizer.Add(minilist, 0, wx.EXPAND ) | 137 self.sizer.Add(self.localBrowse, 0, wx.ALIGN_CENTER) |
138 self.sizer.Add((6, 0)) | |
139 self.sizer.Add(minilist, 0, wx.ALIGN_CENTER) | |
137 self.Bind(wx.EVT_BUTTON, self.on_min_list, minilist) | 140 self.Bind(wx.EVT_BUTTON, self.on_min_list, minilist) |
138 self.Bind(wx.EVT_BUTTON, self.on_miniature, miniadd) | 141 self.Bind(wx.EVT_BUTTON, self.on_miniature, miniadd) |
139 self.Bind(wx.EVT_BUTTON, self.on_browse, self.localBrowse) | 142 self.Bind(wx.EVT_BUTTON, self.on_browse, self.localBrowse) |
140 self.Bind(wx.EVT_CHECKBOX, self.on_label, self.auto_label_cb) | 143 self.Bind(wx.EVT_CHECKBOX, self.on_label, self.auto_label_cb) |
141 | 144 |
575 ## old functions, changed an awful lot | 578 ## old functions, changed an awful lot |
576 | 579 |
577 def on_left_down(self, evt): | 580 def on_left_down(self, evt): |
578 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): | 581 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): |
579 return | 582 return |
580 mini = self.find_mini(evt, evt.ControlDown() and self.role_is_gm()) | 583 mini = self.find_mini(evt, evt.CmdDown() and self.role_is_gm()) |
581 if mini: | 584 if mini: |
582 deselecting_selected_mini = (mini == self.sel_min) #clicked on the selected mini | 585 deselecting_selected_mini = (mini == self.sel_min) #clicked on the selected mini |
583 self.deselectAndRefresh() | 586 self.deselectAndRefresh() |
584 self.drag_mini = mini | 587 self.drag_mini = mini |
585 if deselecting_selected_mini: | 588 if deselecting_selected_mini: |
601 | 604 |
602 def on_right_down(self, evt): | 605 def on_right_down(self, evt): |
603 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): | 606 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): |
604 return | 607 return |
605 self.last_rclick_pos = self.getLogicalPosition(evt) | 608 self.last_rclick_pos = self.getLogicalPosition(evt) |
606 mini = self.find_mini(evt, evt.ControlDown() and self.role_is_gm()) | 609 mini = self.find_mini(evt, evt.CmdDown() and self.role_is_gm()) |
607 if mini: | 610 if mini: |
608 self.sel_rmin = mini | 611 self.sel_rmin = mini |
609 if self.sel_min: | 612 if self.sel_min: |
610 self.min_menu.Enable(MIN_MOVE, True) | 613 self.min_menu.Enable(MIN_MOVE, True) |
611 else: | 614 else: |
726 self.drag_mini = None | 729 self.drag_mini = None |
727 | 730 |
728 def on_left_dclick(self,evt): | 731 def on_left_dclick(self,evt): |
729 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): | 732 if not self.role_is_gm_or_player() or self.alreadyDealingWithMenu(): |
730 return | 733 return |
731 mini = self.find_mini(evt, evt.ControlDown() and self.role_is_gm()) | 734 mini = self.find_mini(evt, evt.CmdDown() and self.role_is_gm()) |
732 if mini: | 735 if mini: |
733 self.on_mini_dclick(evt, mini) | 736 self.on_mini_dclick(evt, mini) |
734 else:# pass it on | 737 else:# pass it on |
735 base_layer_handler.on_left_dclick(self, evt) | 738 base_layer_handler.on_left_dclick(self, evt) |
736 | 739 |