select your current character in the charlist

This commit is contained in:
simio 2025-02-20 05:19:23 -03:00
parent ea20cb72b9
commit 70041822bb

View File

@ -122,6 +122,7 @@ class charselect(QtGui.QWidget):
if self.charlist[ind][1] == 0: # free slot if self.charlist[ind][1] == 0: # free slot
self.chartaken[i].hide() self.chartaken[i].hide()
else: else:
self.chartaken[i].setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)
self.chartaken[i].show() self.chartaken[i].show()
self.buttons[i].show() self.buttons[i].show()
@ -131,6 +132,9 @@ class charselect(QtGui.QWidget):
self.buttons[ind].setPixmap(QtGui.QPixmap(filename)) self.buttons[ind].setPixmap(QtGui.QPixmap(filename))
def onCharClicked(self, ind): def onCharClicked(self, ind):
if self.parent.charname.lower() == self.charlist[ind][0].lower():
self.hide()
return
self.parent.tcp.send("CC#0#"+str(ind+(self.page*self.max_chars_on_page))+"#ur mom gay#%") self.parent.tcp.send("CC#0#"+str(ind+(self.page*self.max_chars_on_page))+"#ur mom gay#%")
def show(self): def show(self):