removed rainbow text and fixed cyan/pink/gray text
This commit is contained in:
parent
da19000d9f
commit
b927606b35
53
gameview.py
53
gameview.py
@ -58,9 +58,9 @@ C_RED = 2
|
||||
C_ORANGE = 3
|
||||
C_BLUE = 4
|
||||
C_YELLOW = 5
|
||||
C_RAINBOW = 6
|
||||
C_PINK = 7
|
||||
C_CYAN = 8
|
||||
C_PINK = 6
|
||||
C_CYAN = 7
|
||||
C_GRAY = 8
|
||||
|
||||
DOWNLOAD_BLACKLIST = []
|
||||
|
||||
@ -1890,7 +1890,7 @@ class gui(QtGui.QWidget):
|
||||
def set_text_color(self):
|
||||
textcolor = int(self.m_chatmessage[TEXT_COLOR])
|
||||
|
||||
is_rainbow = textcolor == 6
|
||||
#is_rainbow = textcolor == 6
|
||||
|
||||
if textcolor == 0:
|
||||
color = QtGui.QColor(255, 255, 255)
|
||||
@ -1905,16 +1905,16 @@ class gui(QtGui.QWidget):
|
||||
elif textcolor == 5:
|
||||
color = QtGui.QColor(255, 255, 0)
|
||||
elif textcolor == 6:
|
||||
color = QtGui.QColor(255, 255, 255)
|
||||
elif textcolor == 7:
|
||||
color = QtGui.QColor(255, 192, 203)
|
||||
elif textcolor == 8:
|
||||
elif textcolor == 7:
|
||||
color = QtGui.QColor(0, 255, 255)
|
||||
elif textcolor == 8:
|
||||
color = QtGui.QColor(200, 200, 200)
|
||||
|
||||
if is_rainbow:
|
||||
self.text.show()
|
||||
self.ao2text.hide()
|
||||
else:
|
||||
# if is_rainbow:
|
||||
# self.text.show()
|
||||
# self.ao2text.hide()
|
||||
# else:
|
||||
self.text.hide()
|
||||
self.ao2text.show()
|
||||
|
||||
@ -2425,9 +2425,9 @@ class gui(QtGui.QWidget):
|
||||
else:
|
||||
self.ao2text.insertHtml(f_character)
|
||||
else:
|
||||
if int(self.m_chatmessage[TEXT_COLOR]) == C_RAINBOW:
|
||||
self.text.setText(self.text.text() + f_character)
|
||||
else:
|
||||
# if int(self.m_chatmessage[TEXT_COLOR]) == C_RAINBOW:
|
||||
# self.text.setText(self.text.text() + f_character)
|
||||
# else:
|
||||
self.ao2text.insertHtml(f_character)
|
||||
|
||||
if self.message_is_centered:
|
||||
@ -2627,7 +2627,7 @@ class gui(QtGui.QWidget):
|
||||
self.colordropdown.clear()
|
||||
self.colordropdown.addItems(['white', 'green', 'red', 'orange', 'blue'])
|
||||
if "yellowtext" in features:
|
||||
self.colordropdown.addItems(['yellow', 'rainbow', 'pink', 'cyan'])
|
||||
self.colordropdown.addItems(['yellow', 'pink', 'cyan', 'gray'])
|
||||
self.colordropdown.setCurrentIndex(self.mychatcolor)
|
||||
|
||||
for hp in hplist:
|
||||
@ -2694,7 +2694,7 @@ class gui(QtGui.QWidget):
|
||||
self.tcpthread.showCharSelect.connect(self.charselect.show)
|
||||
self.tcpthread.allEvidence.connect(self.allEvidence)
|
||||
self.tcpthread.updatePlayerList.connect(self.updatePlayerList)
|
||||
self.tcpthread.rainbowColor.connect(self.text.setStyleSheet)
|
||||
#self.tcpthread.rainbowColor.connect(self.text.setStyleSheet)
|
||||
self.tcpthread.start()
|
||||
|
||||
def allEvidence(self, evi):
|
||||
@ -2963,7 +2963,7 @@ class TCP_Thread(QtCore.QThread):
|
||||
charSlots = QtCore.pyqtSignal()
|
||||
showCharSelect = QtCore.pyqtSignal()
|
||||
allEvidence = QtCore.pyqtSignal(list)
|
||||
rainbowColor = QtCore.pyqtSignal(str)
|
||||
#rainbowColor = QtCore.pyqtSignal(str)
|
||||
updatePlayerList = QtCore.pyqtSignal(str, int, int, str)
|
||||
|
||||
def __init__(self, parent):
|
||||
@ -2972,11 +2972,12 @@ class TCP_Thread(QtCore.QThread):
|
||||
|
||||
def run(self):
|
||||
pingtimer = 150
|
||||
rainbow = 0
|
||||
#rainbow = 0
|
||||
sendtick = 0
|
||||
tempdata = ""
|
||||
color = QtGui.QColor()
|
||||
color.setHsv(rainbow, 255, 255)
|
||||
#color.setHsv(rainbow, 255, 255)
|
||||
color.setHsv(0, 255, 255)
|
||||
while True:
|
||||
if self.parent.disconnectnow:
|
||||
self.parent.selectedplayer = -1
|
||||
@ -2991,13 +2992,13 @@ class TCP_Thread(QtCore.QThread):
|
||||
self.parent.tcp.send('CH#%')
|
||||
pingtimer = 150
|
||||
|
||||
if self.parent.m_chatmessage[TEXT_COLOR] == "6":
|
||||
color.setHsv(rainbow, 255, 255)
|
||||
rainbow += 5
|
||||
if rainbow > 255:
|
||||
rainbow = 0
|
||||
#self.parent.text.setStyleSheet('color: rgb(' + str(color.red()) + ', ' + str(color.green()) + ', ' + str(color.blue()) + ')')
|
||||
self.rainbowColor.emit('color: rgb(' + str(color.red()) + ', ' + str(color.green()) + ', ' + str(color.blue()) + ')')
|
||||
# if self.parent.m_chatmessage[TEXT_COLOR] == "6":
|
||||
# color.setHsv(rainbow, 255, 255)
|
||||
# rainbow += 5
|
||||
# if rainbow > 255:
|
||||
# rainbow = 0
|
||||
# #self.parent.text.setStyleSheet('color: rgb(' + str(color.red()) + ', ' + str(color.green()) + ', ' + str(color.blue()) + ')')
|
||||
# self.rainbowColor.emit('color: rgb(' + str(color.red()) + ', ' + str(color.green()) + ', ' + str(color.blue()) + ')')
|
||||
|
||||
if sendtick:
|
||||
sendtick -= 1
|
||||
|
Loading…
Reference in New Issue
Block a user