Mercurial > traipse_dev
comparison orpg/mapper/base_handler.py @ 71:449a8900f9ac ornery-dev
Code refining almost completed, for this round. Some included files are still in need of some clean up, but this is test worthy.
author | sirebral |
---|---|
date | Thu, 20 Aug 2009 03:00:39 -0500 |
parents | c54768cffbd4 |
children | 06f10429eedc |
comparison
equal
deleted
inserted
replaced
70:52a5fa913008 | 71:449a8900f9ac |
---|---|
49 self.basesizer = wx.BoxSizer(wx.HORIZONTAL) | 49 self.basesizer = wx.BoxSizer(wx.HORIZONTAL) |
50 self.sizer = wx.BoxSizer(wx.HORIZONTAL) | 50 self.sizer = wx.BoxSizer(wx.HORIZONTAL) |
51 self.buttonsizer = wx.BoxSizer(wx.HORIZONTAL) | 51 self.buttonsizer = wx.BoxSizer(wx.HORIZONTAL) |
52 | 52 |
53 self.zoom_in_button = createMaskedButton( self, | 53 self.zoom_in_button = createMaskedButton( self, |
54 orpg.dirpath.dir_struct["icon"]+'zoom_in.gif', "Zoom in from x1.0", wx.ID_ANY ) | 54 dir_struct["icon"]+'zoom_in.gif', "Zoom in from x1.0", wx.ID_ANY ) |
55 self.zoom_out_button = createMaskedButton( self, | 55 self.zoom_out_button = createMaskedButton( self, |
56 orpg.dirpath.dir_struct["icon"]+'zoom_out.gif', "Zoom out from x1.0", wx.ID_ANY ) | 56 dir_struct["icon"]+'zoom_out.gif', "Zoom out from x1.0", wx.ID_ANY ) |
57 props = createMaskedButton( self, | 57 props = createMaskedButton( self, |
58 orpg.dirpath.dir_struct["icon"]+'compass.gif', 'Edit map properties', wx.ID_ANY ) | 58 dir_struct["icon"]+'compass.gif', 'Edit map properties', wx.ID_ANY ) |
59 mapopen = createMaskedButton( self, | 59 mapopen = createMaskedButton( self, |
60 orpg.dirpath.dir_struct["icon"]+'open.bmp', 'Load a map', wx.ID_ANY, '#c0c0c0', wx.BITMAP_TYPE_BMP ) | 60 dir_struct["icon"]+'open.bmp', 'Load a map', wx.ID_ANY, '#c0c0c0', wx.BITMAP_TYPE_BMP ) |
61 mapsave = createMaskedButton( self, | 61 mapsave = createMaskedButton( self, |
62 orpg.dirpath.dir_struct["icon"]+'save.bmp', 'Save the map', wx.ID_ANY, '#c0c0c0', wx.BITMAP_TYPE_BMP ) | 62 dir_struct["icon"]+'save.bmp', 'Save the map', wx.ID_ANY, '#c0c0c0', wx.BITMAP_TYPE_BMP ) |
63 self.buttonsizer.Add(self.zoom_in_button, 0, wx.ALIGN_CENTER ) | 63 self.buttonsizer.Add(self.zoom_in_button, 0, wx.ALIGN_CENTER ) |
64 self.buttonsizer.Add(self.zoom_out_button, 0, wx.ALIGN_CENTER ) | 64 self.buttonsizer.Add(self.zoom_out_button, 0, wx.ALIGN_CENTER ) |
65 self.buttonsizer.Add(props, 0, wx.ALIGN_CENTER ) | 65 self.buttonsizer.Add(props, 0, wx.ALIGN_CENTER ) |
66 self.buttonsizer.Add(mapopen, 0, wx.ALIGN_CENTER ) | 66 self.buttonsizer.Add(mapopen, 0, wx.ALIGN_CENTER ) |
67 self.buttonsizer.Add(mapsave, 0, wx.ALIGN_CENTER ) | 67 self.buttonsizer.Add(mapsave, 0, wx.ALIGN_CENTER ) |
96 self.canvas.Bind(wx.EVT_MENU, self.canvas.on_prop, item) | 96 self.canvas.Bind(wx.EVT_MENU, self.canvas.on_prop, item) |
97 main_menu.AppendItem(item) | 97 main_menu.AppendItem(item) |
98 self.main_menu = main_menu | 98 self.main_menu = main_menu |
99 | 99 |
100 def on_save_map_jpg(self, evt): | 100 def on_save_map_jpg(self, evt): |
101 directory = orpg.dirpath.dir_struct["user"] | 101 directory = dir_struct["user"] |
102 if directory == None: | 102 if directory == None: |
103 directory = "" | 103 directory = "" |
104 d = wx.FileDialog(self.GetParent(), "Save map as a jpg", directory, "", "*.jpg", wx.SAVE) | 104 d = wx.FileDialog(self.GetParent(), "Save map as a jpg", directory, "", "*.jpg", wx.SAVE) |
105 if d.ShowModal() != wx.ID_OK: | 105 if d.ShowModal() != wx.ID_OK: |
106 return | 106 return |