don't use name in char.ini as charname / add unicode chars to iniswap list
This commit is contained in:
parent
3f44b65c60
commit
47ae12b653
10
gameview.py
10
gameview.py
@ -1426,7 +1426,9 @@ class gui(QtGui.QWidget):
|
|||||||
elif isinstance(charname, QtCore.QString):
|
elif isinstance(charname, QtCore.QString):
|
||||||
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.charname = charname # Just use the folder name
|
||||||
|
|
||||||
self.charshowname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "showname")
|
self.charshowname = ini.read_ini(AOpath + 'characters/' + charname + '/char.ini', "options", "showname")
|
||||||
if not self.charshowname == "":
|
if not self.charshowname == "":
|
||||||
self.charshowname = self.charshowname.decode('utf-8')
|
self.charshowname = self.charshowname.decode('utf-8')
|
||||||
@ -1434,7 +1436,7 @@ class gui(QtGui.QWidget):
|
|||||||
|
|
||||||
self.posdropdown.setCurrentIndex(self.posdropdown.findText(self.charside))
|
self.posdropdown.setCurrentIndex(self.posdropdown.findText(self.charside))
|
||||||
self.setJudgeButtons()
|
self.setJudgeButtons()
|
||||||
|
|
||||||
for emoteind in range(1, ini.read_ini_int(AOpath+"characters/"+self.charname+"/char.ini", "emotions", "number") + 1):
|
for emoteind in range(1, ini.read_ini_int(AOpath+"characters/"+self.charname+"/char.ini", "emotions", "number") + 1):
|
||||||
if emoteind == 1:
|
if emoteind == 1:
|
||||||
suffix = 'on'
|
suffix = 'on'
|
||||||
@ -1503,7 +1505,9 @@ class gui(QtGui.QWidget):
|
|||||||
def loadSwapCharacters(self):
|
def loadSwapCharacters(self):
|
||||||
self.charsfolder = []
|
self.charsfolder = []
|
||||||
self.iniswaplist.clear()
|
self.iniswaplist.clear()
|
||||||
for folder in os.listdir(AOpath + 'characters'):
|
for folder in os.listdir(unicode(AOpath + 'characters')):
|
||||||
|
if folder.startswith("sh"):
|
||||||
|
print [folder], exists(AOpath + 'characters/' + folder + '/char.ini')
|
||||||
if exists(AOpath + 'characters/' + folder + '/char.ini'):
|
if exists(AOpath + 'characters/' + folder + '/char.ini'):
|
||||||
self.charsfolder.append(folder)
|
self.charsfolder.append(folder)
|
||||||
self.iniswaplist.addItem(folder)
|
self.iniswaplist.addItem(folder)
|
||||||
|
Loading…
Reference in New Issue
Block a user