Removed placeholder text. Polished UI when no saved game is found.

This commit is contained in:
Khopa 2019-10-11 01:27:29 +02:00
parent 4c3ff906ff
commit 63c46d1b21
2 changed files with 7 additions and 4 deletions

View File

@ -45,8 +45,6 @@ class QLiberationMap(QGraphicsView):
def init_scene(self):
scene = QLiberationScene(self)
scene.addText("Hello World")
self.setScene(scene)
self.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
self.setResizeAnchor(QGraphicsView.AnchorUnderMouse)

View File

@ -1,8 +1,13 @@
from PySide2.QtWidgets import QWidget, QGraphicsScene
from PySide2.QtGui import QFont
from PySide2.QtWidgets import QGraphicsScene
from qt_ui.uiconstants import COLORS
class QLiberationScene(QGraphicsScene):
def __init__(self, parent):
super().__init__(parent)
self.addText("Hello Liberation Map")
item = self.addText("No save file found. Go to \"File/New Game\" to setup a new campaign.",
QFont("Arial", 14, weight=5))
item.setDefaultTextColor(COLORS["white"])