Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AreaOptionsDialog(QtGui.QDialog):
- """Dialog which lets you choose among various from tabs"""
- def __init__(self):
- """Creates and initialises the tab dialog"""
- QtGui.QDialog.__init__(self)
- self.setWindowTitle('Area Options')
- self.tabWidget = QtGui.QTabWidget()
- self.LoadingTab = LoadingTab()
- self.tabWidget.addTab(self.LoadingTab, "On Load")
- buttonBox = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)
- buttonBox.accepted.connect(self.accept)
- buttonBox.rejected.connect(self.reject)
- class LoadingTab(QtGui.QWidget):
- def __init__(self):
- QtGui.QWidget.__init__(self)
- self.timer = QtGui.QSpinBox()
- self.timer.setRange(0, 999)
- self.timer.setToolTip("Sets the countdown timer on load from the world map. It's possible to set different times for the midpoint area.")
- self.timer.setValue(Level.options[2] + 200)
- Layout.addWidget(self.timer)
- self.setLayout(Layout)
- def HandleAreaOptions(self):
- """Pops up the options for Area Dialogue"""
- dlg = AreaOptionsDialog()
- if dlg.exec_() == QtGui.QDialog.Accepted:
- print(dir(dlg))
- Level.options[2] = int(dlg.LoadingTab.timer.value()) - 200
Add Comment
Please, Sign In to add comment