Compare commits

..

No commits in common. "57ec4227128ed3851a7299b75f1efc0b1add26cd" and "ac75a9eeb100c2c2c08bcb03155a8aa446952b05" have entirely different histories.

View File

@ -25,6 +25,7 @@ class charselect(QtGui.QWidget):
super(charselect, self).__init__(parent)
self.parent = parent
self.populated = False
self.dropdownloaded = False
self.page = 0
self.image = QtGui.QLabel(self)
self.image.setPixmap(QtGui.QPixmap(AO2XPpath+"themes/default/charselect_background.png"))
@ -97,7 +98,6 @@ class charselect(QtGui.QWidget):
def populateCharacterDropdown(self):
self.charDropdown.clear()
self.charDropdown.addItem("")
for char in self.charlist:
self.charDropdown.addItem(char[0])
self.populated = True
@ -133,8 +133,6 @@ class charselect(QtGui.QWidget):
self.prevpage.hide()
char = self.charlist[ind][0].lower()
if not exists(AOpath+"characters/"+ char):
print char, "doesn't exist"
if exists(AOpath+"characters/"+ char +"/char_icon.png"): # AO2
self.setBtnImage.emit(AOpath+"characters/"+ char +"/char_icon.png", i)
elif exists(AOpath+"misc/demothings/"+ char +"_char_icon.png"): # AO 1.7.5/1.8
@ -161,9 +159,10 @@ class charselect(QtGui.QWidget):
self.selectChar(ind+(self.page*self.max_chars_on_page))
def onDropdownSelect(self, index):
if index == 0 or self.charDropdown.count() == 1:
return
self.selectChar(index - 1)
if self.dropdownloaded:
self.selectChar(index)
else:
self.dropdownloaded = True
def selectChar(self, charIndex):
self.parent.tcp.send("CC#0#"+str(charIndex)+"#ur mom gay#%")
@ -172,9 +171,6 @@ class charselect(QtGui.QWidget):
self.hide()
self.parent.gamewindow.setFixedSize(self.parent.width, self.parent.height)
self.parent.gamewindow.center()
def onDisconnect(self):
self.populated = False
def show(self):
super(charselect, self).show()