|
7 | 7 | from PyQt5.QtWidgets import (QAction, QApplication, QFileDialog, |
8 | 8 | QMainWindow, QPushButton, ) |
9 | 9 |
|
10 | | -""" |
11 | | -Hover on QPaint detection |
12 | | -def paintEvent(self, event): |
13 | | - option = QtGui.QStyleOptionButton() |
14 | | - option.initFrom(self) |
15 | | - painter = QtGui.QPainter(self) |
16 | | - if option.state & QtGui.QStyle.State_MouseOver: |
17 | | - # do hover stuff ... |
18 | | - else: |
19 | | - # do normal stuff ... |
20 | | -""" |
21 | | - |
22 | | -SoundEffects = { |
23 | | - 'pen break': r'Sounds/pen break.mp3', |
24 | | - 'pen write': r'Sounds/pen writing.wav', |
25 | | - 'fill bucket': r'Sounds/fill bucket.mp3', |
26 | | - 'empty bucket': r'Sounds/empty bucket.mp3', |
27 | | - 'solid hitting': r'Sounds/solidified hitting.m4a', |
28 | | - 'straggly brush': r'Sounds/straggly brushing.m4a' |
29 | | -} |
30 | | - |
31 | 10 |
|
32 | 11 | class ColorBox(QMainWindow): |
33 | 12 | """ This window holds all the color pallettes""" |
@@ -419,7 +398,9 @@ def mouseMoveEvent(self, event): |
419 | 398 |
|
420 | 399 | # this here is to add more realism |
421 | 400 | # to the point when its breaking |
422 | | - if self.currentTool.duration <= 0.2: |
| 401 | + if self.currentTool.duration <= 0.2 \ |
| 402 | + and self.currentTool.toolName != \ |
| 403 | + 'A bucket' or 'Sunbathing Eraser': |
423 | 404 | dots = QPen() |
424 | 405 | broken_tools = QPen() |
425 | 406 | if self.currentTool.toolName == "Pointy Pen": |
|
0 commit comments