Add instruction for marking down numbers

master
En Yi 2018-07-21 15:08:48 +08:00
parent 0bdcbf02f6
commit 1ff6fd522b
1 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,7 @@
from PyQt5.QtGui import QPen from PyQt5.QtGui import QPen
from PyQt5.QtWidgets import QSizePolicy, QGraphicsWidget from PyQt5.QtWidgets import QSizePolicy, QGraphicsWidget
from PyQt5.QtCore import (QAbstractAnimation, Qt, QLineF, QPropertyAnimation, pyqtProperty, from PyQt5.QtCore import (QAbstractAnimation, Qt, QLineF, QPropertyAnimation, pyqtProperty,
pyqtSignal, QSizeF) pyqtSignal, QSizeF, QRectF)
from . import sudoku_graphics as sdk_grap from . import sudoku_graphics as sdk_grap
from . import menu_graphics as menu_grap from . import menu_graphics as menu_grap
@ -158,6 +158,12 @@ class GameBoard(BoxBoard):
self.show_grid(True) self.show_grid(True)
self.newGameSelected.emit(string) self.newGameSelected.emit(string)
def paint(self, painter, style, widget=None):
super().paint(painter, style, widget)
painter.drawText(QRectF(0, self.height+15,self.width,15), Qt.AlignCenter,
"Hold M to mark numbers in a cell")
class MenuBoard(BoxBoard): class MenuBoard(BoxBoard):
""" """