Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

Commit

Permalink
adding a way to change the currentEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
ericoporto committed Jun 6, 2016
1 parent 7c93c84 commit 8276bfc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/fgmk/Editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit 8276bfc

Please sign in to comment.