Files
dusk/tools/editortool/map/statusbar.py
Dominic Masters ae941a0fdb
All checks were successful
Build Dusk / build-linux (push) Successful in 51s
Build Dusk / build-psp (push) Successful in 56s
Fixed crash
2025-11-16 17:24:54 -06:00

18 lines
567 B
Python

from PyQt5.QtWidgets import QStatusBar, QLabel
class StatusBar(QStatusBar):
def __init__(self, parent=None):
super().__init__(parent)
self.parent = parent
self.leftLabel = QLabel("")
self.rightLabel = QLabel("")
self.addWidget(self.leftLabel, 1)
self.addPermanentWidget(self.rightLabel)
parent.map.onMapData.sub(self.onMapData)
def setStatus(self, message):
self.leftLabel.setText(message)
def onMapData(self, data):
self.rightLabel.setText(self.parent.map.mapFileName if self.parent.map.mapFileName else "Untitled.json")