comparison orpg/mapper/grid_handler.py @ 19:78407d627cba traipse_dev

Beginning of Code Clean-up. Some code untested, may break!
author sirebral
date Sat, 25 Jul 2009 17:24:40 -0500
parents 0b8b7e3ed78d
children 072ffc1d466f
comparison
equal deleted inserted replaced
18:67b900deb35c 19:78407d627cba
42 self.grid_ratio = wx.TextCtrl(self, wx.ID_ANY, size=(32,-1) ) 42 self.grid_ratio = wx.TextCtrl(self, wx.ID_ANY, size=(32,-1) )
43 self.color_button = wx.Button(self, wx.ID_ANY, "Color", style=wx.BU_EXACTFIT) 43 self.color_button = wx.Button(self, wx.ID_ANY, "Color", style=wx.BU_EXACTFIT)
44 self.apply_button = wx.Button(self, wx.ID_OK, "Apply", style=wx.BU_EXACTFIT) 44 self.apply_button = wx.Button(self, wx.ID_OK, "Apply", style=wx.BU_EXACTFIT)
45 self.color_button.SetBackgroundColour(wx.BLACK) 45 self.color_button.SetBackgroundColour(wx.BLACK)
46 self.color_button.SetForegroundColour(wx.WHITE) 46 self.color_button.SetForegroundColour(wx.WHITE)
47
48 """
49 self.sizer.Add(wx.StaticText(self, -1, "Size: "), 0, wx.ALIGN_CENTER|wx.ALL, 3)
50 self.sizer.Add(self.grid_size, 0, wx.EXPAND|wx.ALL, 2)
51 self.sizer.Add(wx.StaticText(self, -1, "Ratio: "), 0, wx.ALIGN_CENTER|wx.ALL, 3)
52 self.sizer.Add(self.grid_ratio, 0, wx.EXPAND|wx.ALL, 2)
53 self.sizer.Add(self.line_type, 0, wx.EXPAND|wx.ALL, 3)
54 self.sizer.Add(self.grid_mode, 0, wx.EXPAND|wx.ALL, 2)
55 self.sizer.Add(self.grid_snap, 0, wx.EXPAND|wx.ALL, 3)
56 self.sizer.Add(self.color_button, 0, wx.EXPAND|wx.ALL, 2)
57 self.sizer.Add(self.apply_button, 0, wx.EXPAND|wx.ALL, 3)
58 self.sizer.Add(wx.Size(20,25),1)
59 """
60
61 self.sizer.Add(wx.StaticText(self, -1, "Size: "), 0, wx.ALIGN_CENTER) 47 self.sizer.Add(wx.StaticText(self, -1, "Size: "), 0, wx.ALIGN_CENTER)
62 self.sizer.Add(self.grid_size, 0, wx.ALIGN_CENTER) 48 self.sizer.Add(self.grid_size, 0, wx.ALIGN_CENTER)
63 self.sizer.Add((6,0)) 49 self.sizer.Add((6,0))
64 self.sizer.Add(wx.StaticText(self, -1, "Ratio: "), 0, wx.ALIGN_CENTER) 50 self.sizer.Add(wx.StaticText(self, -1, "Ratio: "), 0, wx.ALIGN_CENTER)
65 self.sizer.Add(self.grid_ratio, 0, wx.ALIGN_CENTER) 51 self.sizer.Add(self.grid_ratio, 0, wx.ALIGN_CENTER)
71 self.sizer.Add(self.grid_snap, 0, wx.ALIGN_CENTER) 57 self.sizer.Add(self.grid_snap, 0, wx.ALIGN_CENTER)
72 self.sizer.Add((6,0)) 58 self.sizer.Add((6,0))
73 self.sizer.Add(self.color_button, 0, wx.ALIGN_CENTER) 59 self.sizer.Add(self.color_button, 0, wx.ALIGN_CENTER)
74 self.sizer.Add((6,0)) 60 self.sizer.Add((6,0))
75 self.sizer.Add(self.apply_button, 0, wx.ALIGN_CENTER) 61 self.sizer.Add(self.apply_button, 0, wx.ALIGN_CENTER)
76
77 self.Bind(wx.EVT_BUTTON, self.on_bg_color, self.color_button) 62 self.Bind(wx.EVT_BUTTON, self.on_bg_color, self.color_button)
78 self.Bind(wx.EVT_BUTTON, self.on_apply, self.apply_button) 63 self.Bind(wx.EVT_BUTTON, self.on_apply, self.apply_button)
79 self.update_info() 64 self.update_info()
80 65
81 def update_info(self): 66 def update_info(self):