summaryrefslogtreecommitdiff
path: root/src/editorui
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-29 19:40:50 +0200
committerTreeki <treeki@gmail.com>2012-08-29 19:40:50 +0200
commit7e177703c0380ebf9d6afe9f27df4db24903d6ad (patch)
tree088c0237035b4cc684150e295a5412badf757aec /src/editorui
parenta0fb27c3f890aec576e09754b2e008459956e1f7 (diff)
parentb7ae37e17b8704a6ba3779625c65d1bb05bec251 (diff)
downloadkoopatlas-7e177703c0380ebf9d6afe9f27df4db24903d6ad.tar.gz
koopatlas-7e177703c0380ebf9d6afe9f27df4db24903d6ad.zip
Merge branch 'master' of tsn:Koopatlas ARGH
Diffstat (limited to '')
-rw-r--r--src/editorui/doodads.py6
-rw-r--r--src/editorui/editormain.py1
-rw-r--r--src/editorui/paths.py37
3 files changed, 37 insertions, 7 deletions
diff --git a/src/editorui/doodads.py b/src/editorui/doodads.py
index bdba4d4..7e150cd 100644
--- a/src/editorui/doodads.py
+++ b/src/editorui/doodads.py
@@ -47,7 +47,8 @@ class KPEditorDoodad(KPEditorItem):
elif isinstance(thong, float):
editWidget = QtGui.QDoubleSpinBox(parent)
editWidget.setSingleStep(0.05)
- editWidget.setRange(-10000.0, 10000.0)
+ editWidget.setDecimals(2)
+ editWidget.setRange(-99999.0, 99999.0)
return editWidget
else:
@@ -313,8 +314,6 @@ class KPEditorDoodad(KPEditorItem):
model = self.menuWidget.model
rows = model.rowCount()
- print 'Resolving'
-
for x in xrange(rows):
rowList = []
@@ -330,7 +329,6 @@ class KPEditorDoodad(KPEditorItem):
anmList.append(rowList)
- print anmList
doodad.animations = anmList
doodad.setupAnimations()
diff --git a/src/editorui/editormain.py b/src/editorui/editormain.py
index 1ff08ee..3ee593b 100644
--- a/src/editorui/editormain.py
+++ b/src/editorui/editormain.py
@@ -764,7 +764,6 @@ class KPEditorWidget(QtGui.QGraphicsView):
KP.mainWindow.handleSelectedLayerChanged(kLayer)
index = KP.map.refLayer(kLayer)
- print 'selecting row {0}'.format(index)
KP.mainWindow.layerList.selectLayer(index)
itemsUnder[0].setSelected(True)
diff --git a/src/editorui/paths.py b/src/editorui/paths.py
index 70c3b99..394b82a 100644
--- a/src/editorui/paths.py
+++ b/src/editorui/paths.py
@@ -86,6 +86,17 @@ class KPEditorNode(KPEditorItem):
self.setPalette(palette)
+ class SecretBox(QtGui.QCheckBox):
+ def __init__(self):
+ QtGui.QCheckBox.__init__(self)
+
+ palette = self.palette()
+ palette.setColor(QtGui.QPalette.ButtonText, Qt.black)
+ palette.setColor(QtGui.QPalette.Window, Qt.transparent)
+
+ self.setPalette(palette)
+
+
class mapArcEdit(QtGui.QLineEdit):
def __init__(self):
QtGui.QLineEdit.__init__(self)
@@ -129,10 +140,17 @@ class KPEditorNode(KPEditorItem):
self.stageProxy = self.HiddenProxy(self.stage, self, 6, 24)
self.stage.valueChanged.connect(self.stageChange)
+ self.secret = self.SecretBox()
+ self.secretProxy = self.HiddenProxy(self.secret, self, -60, 26)
+ self.secret.stateChanged.connect(self.secretChange)
+
if node.level != None:
self.world.setValue(node.level[0])
self.stage.setValue(node.level[1])
+ if node.hasSecret != None:
+ self.secret.setChecked(node.hasSecret)
+
self.foreignID = self.LevelSlotSpinner()
self.foreignIDProxy = self.HiddenProxy(self.foreignID, self, 60, 24)
@@ -217,6 +235,15 @@ class KPEditorNode(KPEditorItem):
@QtCore.pyqtSlot(int)
+ def secretChange(self, secret):
+
+ node = self._nodeRef()
+ node.hasSecret = secret
+
+ KP.mainWindow.pathNodeList.update()
+
+
+ @QtCore.pyqtSlot(int)
def foreignIDChange(self, ID):
node = self._nodeRef()
@@ -329,11 +356,12 @@ class KPEditorNode(KPEditorItem):
if node.level:
self.worldProxy.show()
self.stageProxy.show()
+ self.secretProxy.show()
else:
self.worldProxy.hide()
self.stageProxy.hide()
-
+ self.secretProxy.hide()
if node.mapChange != None:
self.foreignID.show()
@@ -349,6 +377,7 @@ class KPEditorNode(KPEditorItem):
self.buttonProxy.hide()
self.worldProxy.hide()
self.stageProxy.hide()
+ self.secretProxy.hide()
self.foreignID.hide()
self.transition.hide()
self.mapChange.hide()
@@ -358,7 +387,11 @@ class KPEditorNode(KPEditorItem):
node = self._nodeRef()
layer = KP.map.pathLayer
- layer.nodes.remove(node)
+ try:
+ layer.nodes.remove(node)
+ except ValueError:
+ pass
+
KP.mainWindow.pathNodeList.removeLayer(node)
if len(node.exits) == 2: