Mercurial > traipse_dev
comparison orpg/mapper/map_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 |
---|---|
32 def __init__(self, parent, id, canvas): | 32 def __init__(self, parent, id, canvas): |
33 base_layer_handler.__init__(self, parent, id, canvas) | 33 base_layer_handler.__init__(self, parent, id, canvas) |
34 | 34 |
35 def build_ctrls(self): | 35 def build_ctrls(self): |
36 base_layer_handler.build_ctrls(self) | 36 base_layer_handler.build_ctrls(self) |
37 | |
38 """ | |
39 self.width = wx.TextCtrl(self, wx.ID_ANY, size=(75,25)) | |
40 self.height = wx.TextCtrl(self, wx.ID_ANY, size=(75,25)) | |
41 self.apply_button = wx.Button(self, wx.ID_OK, "Apply", style=wx.BU_EXACTFIT) | |
42 """ | |
43 | |
44 self.width = wx.TextCtrl(self, wx.ID_ANY) | 37 self.width = wx.TextCtrl(self, wx.ID_ANY) |
45 self.height = wx.TextCtrl(self, wx.ID_ANY) | 38 self.height = wx.TextCtrl(self, wx.ID_ANY) |
46 self.apply_button = wx.Button(self, wx.ID_OK, "Apply", style=wx.BU_EXACTFIT) | 39 self.apply_button = wx.Button(self, wx.ID_OK, "Apply", style=wx.BU_EXACTFIT) |
47 | |
48 self.load_default = wx.Button(self, wx.ID_ANY, "Default Map", style=wx.BU_EXACTFIT) | 40 self.load_default = wx.Button(self, wx.ID_ANY, "Default Map", style=wx.BU_EXACTFIT) |
49 | |
50 """ | |
51 self.sizer.Prepend(wx.Size(20,25),1) | |
52 self.sizer.Prepend(self.load_default, 0, wx.EXPAND) | |
53 self.sizer.Prepend(wx.Size(20,25)) | |
54 self.sizer.Prepend(self.apply_button, 0, wx.EXPAND) | |
55 self.sizer.Prepend(wx.Size(20,25)) | |
56 self.sizer.Prepend(self.height, 0, wx.EXPAND) | |
57 self.sizer.Prepend(wx.StaticText(self, -1, "Height: "),0,wx.ALIGN_CENTER) | |
58 self.sizer.Prepend(wx.Size(10,25)) | |
59 self.sizer.Prepend(self.width, 0, wx.EXPAND) | |
60 self.sizer.Prepend(wx.StaticText(self, -1, "Width: "),0,wx.ALIGN_CENTER) | |
61 self.sizer.Prepend(wx.Size(10,25)) | |
62 """ | |
63 | |
64 self.sizer.Add(wx.StaticText(self, -1, "Width: "),0, wx.ALIGN_CENTER) | 41 self.sizer.Add(wx.StaticText(self, -1, "Width: "),0, wx.ALIGN_CENTER) |
65 self.sizer.Add(self.width, 0, wx.ALIGN_CENTER) | 42 self.sizer.Add(self.width, 0, wx.ALIGN_CENTER) |
66 self.sizer.Add((6, 0)) | 43 self.sizer.Add((6, 0)) |
67 self.sizer.Add(wx.StaticText(self, -1, "Height: "),0, wx.ALIGN_CENTER) | 44 self.sizer.Add(wx.StaticText(self, -1, "Height: "),0, wx.ALIGN_CENTER) |
68 self.sizer.Add(self.height, 0, wx.ALIGN_CENTER) | 45 self.sizer.Add(self.height, 0, wx.ALIGN_CENTER) |
69 self.sizer.Add((6, 0)) | 46 self.sizer.Add((6, 0)) |
70 self.sizer.Add(self.apply_button, 0, wx.ALIGN_CENTER) | 47 self.sizer.Add(self.apply_button, 0, wx.ALIGN_CENTER) |
71 self.sizer.Add((6, 0)) | 48 self.sizer.Add((6, 0)) |
72 self.sizer.Add(self.load_default, 0, wx.ALIGN_CENTER) | 49 self.sizer.Add(self.load_default, 0, wx.ALIGN_CENTER) |
73 | |
74 self.Bind(wx.EVT_BUTTON, self.on_apply, self.apply_button) | 50 self.Bind(wx.EVT_BUTTON, self.on_apply, self.apply_button) |
75 self.Bind(wx.EVT_BUTTON, self.on_load_default, self.load_default) | 51 self.Bind(wx.EVT_BUTTON, self.on_load_default, self.load_default) |
76 self.update_info() | 52 self.update_info() |
77 | 53 |
78 def update_info(self): | 54 def update_info(self): |