support character shownames
This commit is contained in:
parent
b3aaf8816d
commit
e287391acc
12
gameview.py
12
gameview.py
@ -1091,6 +1091,7 @@ class gui(QtGui.QWidget):
|
||||
self.charemotes = []
|
||||
self.selectedemote = 0
|
||||
self.charname = ''
|
||||
self.charshowname = ''
|
||||
self.charside = 'def'
|
||||
self.lastmsg = ''
|
||||
self.msgqueue = []
|
||||
@ -1359,6 +1360,9 @@ class gui(QtGui.QWidget):
|
||||
charname = unicode(charname.toLower())
|
||||
|
||||
self.charname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "name", charname).decode('utf-8').lower()
|
||||
self.charshowname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "showname")
|
||||
if not self.charshowname == "":
|
||||
self.charshowname = self.charshowname.decode('utf-8')
|
||||
self.charside = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "side", "def")
|
||||
|
||||
self.posdropdown.setCurrentIndex(self.posdropdown.findText(self.charside))
|
||||
@ -1623,6 +1627,9 @@ class gui(QtGui.QWidget):
|
||||
text = mockStr(text)
|
||||
if self.autocaps.isChecked():
|
||||
l = list(text)
|
||||
if isinstance(l[0], QtCore.QString):
|
||||
l[0] = l[0].toUpper()
|
||||
else:
|
||||
l[0] = l[0].upper()
|
||||
if l[-1] != ".":
|
||||
l.append(".")
|
||||
@ -1714,7 +1721,10 @@ class gui(QtGui.QWidget):
|
||||
msg += str(self.mychatcolor)+"#"
|
||||
|
||||
if "cccc_ic_support" in self.features:
|
||||
msg += self.showname+"#" # custom showname
|
||||
showname = self.showname
|
||||
if self.showname == "" and not self.charshowname == "":
|
||||
showname = self.charshowname
|
||||
msg += showname+"#" # custom showname
|
||||
if self.paircheckbox.isChecked():
|
||||
msg += str(self.pairdropdown.currentIndex()) # pair charID
|
||||
if "effects" in self.features:
|
||||
|
Loading…
Reference in New Issue
Block a user