summaryrefslogtreecommitdiff
path: root/src/editorui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/editorui/paths.py33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/editorui/paths.py b/src/editorui/paths.py
index ec98fb9..fd27a9c 100644
--- a/src/editorui/paths.py
+++ b/src/editorui/paths.py
@@ -18,7 +18,8 @@ class KPEditorNode(KPEditorItem):
self.iconList = [QtGui.QIcon("Resources/Through.png"),
QtGui.QIcon("Resources/Level.png"),
- QtGui.QIcon("Resources/Stop.png")]
+ QtGui.QIcon("Resources/Stop.png"),
+ QtGui.QIcon("Resources/Exit.png")]
self.state = 0
@@ -26,13 +27,13 @@ class KPEditorNode(KPEditorItem):
KPEditorNode.ToggleButton.PALETTE = QtGui.QPalette(Qt.transparent)
self.setPalette(self.PALETTE)
-
+
self.released.connect(self.toggle)
def toggle(self):
self.state += 1
- if self.state == 3:
+ if self.state == 4:
self.state = 0
self.stateToggled.emit(self.state)
@@ -112,19 +113,27 @@ class KPEditorNode(KPEditorItem):
node = self._nodeRef()
+ node.transition = 0
+ node.mapChange = None
+ node.mapID = None
+ node.isStop = True
+ node.level = [0,0]
+
if state == 1:
- node.isStop = True
node.level = [1, 1]
self.world.setValue(node.level[0])
self.stage.setValue(node.level[1])
elif state == 2:
- node.isStop = True
- node.level = [0,0]
+ pass
- else:
+ elif state == 3:
node.isStop = False
- node.level = [0,0]
+
+ else:
+ node.transition = 0
+ node.mapChange = 'None.arc'
+ node.mapID = 0
self.update()
@@ -170,6 +179,12 @@ class KPEditorNode(KPEditorItem):
painter.drawPixmap(self._boundingRect.topLeft(), QtGui.QPixmap("Resources/BlackLevel.png"))
selectionRect = self._boundingRect.adjusted(1,5,-1,-5)
+ elif node.mapChange != None:
+ painter.setBrush(QtGui.QColor(0, 0, 0, 0))
+ painter.setPen(QtGui.QColor(0, 0, 0, 0))
+ painter.drawPixmap(self._boundingRect.topLeft(), QtGui.QPixmap("Resources/ExitWorld.png"))
+ selectionRect = self._boundingRect.adjusted(1,5,-1,-5)
+
elif node.isStop:
brush = QtGui.QBrush(QtGui.QColor(255, 220, 220))
painter.setPen(QtGui.QColor(255, 255, 255))
@@ -185,6 +200,8 @@ class KPEditorNode(KPEditorItem):
selectionRect = self._tinyRect.adjusted(-1,-1,1,1)
+
+
if self.isSelected():
painter.setPen(self.SELECTION_PEN)
painter.setBrush(QtGui.QColor(0,0,0,0))