Prepping editor more...
This commit is contained in:
18
tools/editortool/statusbar.py
Normal file
18
tools/editortool/statusbar.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from PyQt5.QtWidgets import QStatusBar, QLabel
|
||||
|
||||
class StatusBar(QStatusBar):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
self.parent = parent
|
||||
self.leftLabel = QLabel("Ready")
|
||||
self.rightLabel = QLabel("")
|
||||
self.addWidget(self.leftLabel, 1)
|
||||
self.addPermanentWidget(self.rightLabel)
|
||||
|
||||
parent.mapData.onMapData.sub(self.onMapData)
|
||||
|
||||
def setStatus(self, message):
|
||||
self.leftLabel.setText(message)
|
||||
|
||||
def onMapData(self, data):
|
||||
self.rightLabel.setText(self.parent.mapData.mapFileName if self.parent.mapData.mapFileName else "Untitled.json")
|
||||
Reference in New Issue
Block a user