Mercurial > fife-parpg
comparison clients/editor/plugins/mapeditor.py @ 179:28532ae6f9f6
Moved all editor content out of content, as chewie says it's deprecated as hell ;-)
author | cheesesucker@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 30 Jan 2009 00:54:07 +0000 |
parents | 3fb17daa1b27 |
children | bcc93e17f978 |
comparison
equal
deleted
inserted
replaced
178:7dc59bd3d6b1 | 179:28532ae6f9f6 |
---|---|
30 self._onLayerSelect = onLayerSelect | 30 self._onLayerSelect = onLayerSelect |
31 self._onObjectSelect = onObjectSelect | 31 self._onObjectSelect = onObjectSelect |
32 | 32 |
33 def show(self, map): | 33 def show(self, map): |
34 if not self._mapedit: | 34 if not self._mapedit: |
35 self._mapedit = pychan.loadXML('content/gui/mapeditor.xml') | 35 self._mapedit = pychan.loadXML('gui/mapeditor.xml') |
36 self._mapedit.mapEvents({ | 36 self._mapedit.mapEvents({ |
37 'layerButton' : self._onLayerSelect, | 37 'layerButton' : self._onLayerSelect, |
38 'objButton' : self._onObjectSelect, | 38 'objButton' : self._onObjectSelect, |
39 'closeButton' : self.hide | 39 'closeButton' : self.hide |
40 }) | 40 }) |
61 self.onBtnEnter, self.onBtnExit = onBtnEnter, onBtnExit | 61 self.onBtnEnter, self.onBtnExit = onBtnEnter, onBtnExit |
62 self._toolbar = None | 62 self._toolbar = None |
63 | 63 |
64 def show(self): | 64 def show(self): |
65 if not self._toolbar: | 65 if not self._toolbar: |
66 self._toolbar = pychan.loadXML('content/gui/tools.xml') | 66 self._toolbar = pychan.loadXML('gui/tools.xml') |
67 evtmap = { | 67 evtmap = { |
68 'btnSelect' : self._onSelect, | 68 'btnSelect' : self._onSelect, |
69 'btnMove' : self._onMove, | 69 'btnMove' : self._onMove, |
70 'btnInsert' : self._onInsert, | 70 'btnInsert' : self._onInsert, |
71 'btnDelete' : self._onDelete | 71 'btnDelete' : self._onDelete |
105 self.enableInsert(False) | 105 self.enableInsert(False) |
106 self.enableMove(False) | 106 self.enableMove(False) |
107 | 107 |
108 class StatusBar(object): | 108 class StatusBar(object): |
109 def __init__(self, screenw, screenh): | 109 def __init__(self, screenw, screenh): |
110 self._statusbar = pychan.loadXML('content/gui/statuspanel.xml') | 110 self._statusbar = pychan.loadXML('gui/statuspanel.xml') |
111 self._statusbar.show() | 111 self._statusbar.show() |
112 height = 25 | 112 height = 25 |
113 self._statusbar.position = (0, screenh - height) | 113 self._statusbar.position = (0, screenh - height) |
114 self._statusbar.size = (screenw, height) | 114 self._statusbar.size = (screenw, height) |
115 self.statustxt = '' | 115 self.statustxt = '' |