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