From 8276bfc4ee9e70901a8fb29395c5b724e49ba05d Mon Sep 17 00:00:00 2001 From: ericoporto Date: Mon, 6 Jun 2016 20:51:49 -0300 Subject: [PATCH] adding a way to change the currentEvent --- src/fgmk/Editor.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/fgmk/Editor.py b/src/fgmk/Editor.py index 50ccff4..f0e235b 100644 --- a/src/fgmk/Editor.py +++ b/src/fgmk/Editor.py @@ -36,6 +36,8 @@ def changeTileCurrent(changeTo): __mwind__.myMapWidget.currentTile = changeTo __mwind__.myPaletteWidget.setImageCurrent(changeTo) +def changeEventCurrent(changeTo): + __mwind__.myMapWidget.currentEvent = changeTo def changeLayerCurrent(changeTo): __mwind__.myMapWidget.currentLayer = changeTo @@ -369,8 +371,18 @@ def __init__(self, pMap, parent=None, **kwargs): VBoxEventsList = QVBoxLayout() VBoxActionList = QVBoxLayout() + VBoxLeftButtons = QVBoxLayout() VBoxButtons = QVBoxLayout() + VBoxLeftButtons.setAlignment(Qt.AlignTop) + + self.labelEventsCurrent = QLabel("Event NÂș") + self.eventSelectSpinbox = QSpinBox(self) + self.eventSelectSpinbox.setMinimum(1) + self.eventSelectSpinbox.setMaximum(100) + self.eventSelectSpinbox.setSingleStep(1) + self.eventSelectSpinbox.valueChanged.connect(changeEventCurrent) + self.addActionButton = QPushButton("Add Action", self) self.editActionButton = QPushButton("Edit Action", self) self.removeActionButton = QPushButton("Remove Action", self) @@ -387,8 +399,12 @@ def __init__(self, pMap, parent=None, **kwargs): self.HBox.addLayout(VBoxEventsList) self.HBox.addLayout(VBoxActionList) + self.HBox.addLayout(VBoxLeftButtons) self.HBox.addLayout(VBoxButtons) + VBoxLeftButtons.addWidget(self.labelEventsCurrent) + VBoxLeftButtons.addWidget(self.eventSelectSpinbox) + VBoxEventsList.addWidget(self.labelEventsList) VBoxEventsList.addWidget(self.EventsList)