additive text now functional
This commit is contained in:
parent
b06afc30b7
commit
c246ac9c85
23
gameview.py
23
gameview.py
@ -600,6 +600,7 @@ class gui(QtGui.QWidget):
|
|||||||
blank_blip = False
|
blank_blip = False
|
||||||
chatmessage_is_empty = False
|
chatmessage_is_empty = False
|
||||||
is_additive = False
|
is_additive = False
|
||||||
|
additive_char = -1
|
||||||
anim_state = 3
|
anim_state = 3
|
||||||
text_state = 2
|
text_state = 2
|
||||||
objection_state = 0
|
objection_state = 0
|
||||||
@ -871,6 +872,7 @@ class gui(QtGui.QWidget):
|
|||||||
self.additivebtn.setText('Additive text')
|
self.additivebtn.setText('Additive text')
|
||||||
self.additivebtn.resize(self.additivebtn.sizeHint())
|
self.additivebtn.resize(self.additivebtn.sizeHint())
|
||||||
self.additivebtn.move(272+60, 272+28)
|
self.additivebtn.move(272+60, 272+28)
|
||||||
|
self.additivebtn.clicked.connect(self.onAdditiveCheck)
|
||||||
|
|
||||||
self.effectdropdown = QtGui.QComboBox(self)
|
self.effectdropdown = QtGui.QComboBox(self)
|
||||||
self.effectdropdown.setGeometry(272+60, 272+28+18, 88, 20)
|
self.effectdropdown.setGeometry(272+60, 272+28+18, 88, 20)
|
||||||
@ -1001,6 +1003,13 @@ class gui(QtGui.QWidget):
|
|||||||
|
|
||||||
self.charselect = charselect.charselect(self)
|
self.charselect = charselect.charselect(self)
|
||||||
|
|
||||||
|
def onAdditiveCheck(self):
|
||||||
|
if self.additivebtn.isChecked():
|
||||||
|
self.icchatinput.home(False)
|
||||||
|
self.icchatinput.insert(" ")
|
||||||
|
self.icchatinput.end(False)
|
||||||
|
self.icchatinput.setFocus()
|
||||||
|
|
||||||
def onRealizationButton(self):
|
def onRealizationButton(self):
|
||||||
if self.realizationbtn.isPressed():
|
if self.realizationbtn.isPressed():
|
||||||
self.effectdropdown.setCurrentIndex(1) # realization
|
self.effectdropdown.setCurrentIndex(1) # realization
|
||||||
@ -1580,6 +1589,8 @@ class gui(QtGui.QWidget):
|
|||||||
if f_char_id == self.mychar and self.m_chatmessage[CHATMSG] == chatmsgcomp: # our message showed up
|
if f_char_id == self.mychar and self.m_chatmessage[CHATMSG] == chatmsgcomp: # our message showed up
|
||||||
del self.msgqueue[0]
|
del self.msgqueue[0]
|
||||||
self.msgqueueList.takeItem(0)
|
self.msgqueueList.takeItem(0)
|
||||||
|
if self.additivebtn.isChecked():
|
||||||
|
self.icchatinput.insert(" ")
|
||||||
|
|
||||||
f_char = self.m_chatmessage[CHARNAME]
|
f_char = self.m_chatmessage[CHARNAME]
|
||||||
evidence = int(self.m_chatmessage[EVIDENCE])-1
|
evidence = int(self.m_chatmessage[EVIDENCE])-1
|
||||||
@ -1723,8 +1734,6 @@ class gui(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.name.setText(self.m_chatmessage[SHOWNAME].decode("utf-8"))
|
self.name.setText(self.m_chatmessage[SHOWNAME].decode("utf-8"))
|
||||||
|
|
||||||
self.ao2text.clear()
|
|
||||||
self.text.setText("")
|
|
||||||
self.chatbox.hide()
|
self.chatbox.hide()
|
||||||
|
|
||||||
self.set_scene()
|
self.set_scene()
|
||||||
@ -2006,10 +2015,14 @@ class gui(QtGui.QWidget):
|
|||||||
elif self.m_chatmessage[REALIZATION] == "1":
|
elif self.m_chatmessage[REALIZATION] == "1":
|
||||||
self.setWhiteFlash(True, 1, 125)
|
self.setWhiteFlash(True, 1, 125)
|
||||||
|
|
||||||
self.ao2text.clear()
|
|
||||||
self.text.setText("")
|
|
||||||
self.set_text_color()
|
self.set_text_color()
|
||||||
|
|
||||||
|
charid = int(self.m_chatmessage[CHAR_ID])
|
||||||
|
if not self.is_additive or self.additive_char != charid:
|
||||||
|
self.ao2text.clear()
|
||||||
|
self.text.setText("")
|
||||||
|
self.additive_char = charid
|
||||||
|
|
||||||
if self.chatmessage_is_empty:
|
if self.chatmessage_is_empty:
|
||||||
self.text_state = 2
|
self.text_state = 2
|
||||||
return
|
return
|
||||||
@ -2017,6 +2030,7 @@ class gui(QtGui.QWidget):
|
|||||||
self.inline_color_stack = []
|
self.inline_color_stack = []
|
||||||
|
|
||||||
self.chatbox.show()
|
self.chatbox.show()
|
||||||
|
|
||||||
self.tick_pos = 0
|
self.tick_pos = 0
|
||||||
self.blip_pos = 0
|
self.blip_pos = 0
|
||||||
self.inline_blue_depth = 0
|
self.inline_blue_depth = 0
|
||||||
@ -2024,7 +2038,6 @@ class gui(QtGui.QWidget):
|
|||||||
self.current_display_speed = 3
|
self.current_display_speed = 3
|
||||||
self.chat_tick_timer.start(self.message_display_speed[self.current_display_speed])
|
self.chat_tick_timer.start(self.message_display_speed[self.current_display_speed])
|
||||||
|
|
||||||
charid = int(self.m_chatmessage[CHAR_ID])
|
|
||||||
self.blip = self.charlist[charid][2]
|
self.blip = self.charlist[charid][2]
|
||||||
|
|
||||||
if exists(AOpath+"sounds/general/sfx-blip"+self.blip+".wav"):
|
if exists(AOpath+"sounds/general/sfx-blip"+self.blip+".wav"):
|
||||||
|
Loading…
Reference in New Issue
Block a user