Compare commits
No commits in common. "57ec4227128ed3851a7299b75f1efc0b1add26cd" and "ac75a9eeb100c2c2c08bcb03155a8aa446952b05" have entirely different histories.
57ec422712
...
ac75a9eeb1
@ -25,6 +25,7 @@ class charselect(QtGui.QWidget):
|
|||||||
super(charselect, self).__init__(parent)
|
super(charselect, self).__init__(parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.populated = False
|
self.populated = False
|
||||||
|
self.dropdownloaded = False
|
||||||
self.page = 0
|
self.page = 0
|
||||||
self.image = QtGui.QLabel(self)
|
self.image = QtGui.QLabel(self)
|
||||||
self.image.setPixmap(QtGui.QPixmap(AO2XPpath+"themes/default/charselect_background.png"))
|
self.image.setPixmap(QtGui.QPixmap(AO2XPpath+"themes/default/charselect_background.png"))
|
||||||
@ -97,7 +98,6 @@ class charselect(QtGui.QWidget):
|
|||||||
|
|
||||||
def populateCharacterDropdown(self):
|
def populateCharacterDropdown(self):
|
||||||
self.charDropdown.clear()
|
self.charDropdown.clear()
|
||||||
self.charDropdown.addItem("")
|
|
||||||
for char in self.charlist:
|
for char in self.charlist:
|
||||||
self.charDropdown.addItem(char[0])
|
self.charDropdown.addItem(char[0])
|
||||||
self.populated = True
|
self.populated = True
|
||||||
@ -133,8 +133,6 @@ class charselect(QtGui.QWidget):
|
|||||||
self.prevpage.hide()
|
self.prevpage.hide()
|
||||||
|
|
||||||
char = self.charlist[ind][0].lower()
|
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
|
if exists(AOpath+"characters/"+ char +"/char_icon.png"): # AO2
|
||||||
self.setBtnImage.emit(AOpath+"characters/"+ char +"/char_icon.png", i)
|
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
|
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))
|
self.selectChar(ind+(self.page*self.max_chars_on_page))
|
||||||
|
|
||||||
def onDropdownSelect(self, index):
|
def onDropdownSelect(self, index):
|
||||||
if index == 0 or self.charDropdown.count() == 1:
|
if self.dropdownloaded:
|
||||||
return
|
self.selectChar(index)
|
||||||
self.selectChar(index - 1)
|
else:
|
||||||
|
self.dropdownloaded = True
|
||||||
|
|
||||||
def selectChar(self, charIndex):
|
def selectChar(self, charIndex):
|
||||||
self.parent.tcp.send("CC#0#"+str(charIndex)+"#ur mom gay#%")
|
self.parent.tcp.send("CC#0#"+str(charIndex)+"#ur mom gay#%")
|
||||||
@ -173,9 +172,6 @@ class charselect(QtGui.QWidget):
|
|||||||
self.parent.gamewindow.setFixedSize(self.parent.width, self.parent.height)
|
self.parent.gamewindow.setFixedSize(self.parent.width, self.parent.height)
|
||||||
self.parent.gamewindow.center()
|
self.parent.gamewindow.center()
|
||||||
|
|
||||||
def onDisconnect(self):
|
|
||||||
self.populated = False
|
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
super(charselect, self).show()
|
super(charselect, self).show()
|
||||||
self.parent.gamewindow.setFixedSize(714, 668)
|
self.parent.gamewindow.setFixedSize(714, 668)
|
||||||
|
Loading…
Reference in New Issue
Block a user