center the game window
This commit is contained in:
parent
a172992fa0
commit
eb57bea8b0
@ -1,4 +1,5 @@
|
|||||||
self.gamewindow.setFixedSize(820, 730)
|
self.gamewindow.setFixedSize(820, 730)
|
||||||
|
self.gamewindow.center()
|
||||||
|
|
||||||
self.ooclog.setGeometry(814 - 288, 0, 288, 248)
|
self.ooclog.setGeometry(814 - 288, 0, 288, 248)
|
||||||
self.oocnameinput.resize(self.oocnameinput.sizeHint().width() - 32, self.oocnameinput.sizeHint().height())
|
self.oocnameinput.resize(self.oocnameinput.sizeHint().width() - 32, self.oocnameinput.sizeHint().height())
|
||||||
|
@ -1346,6 +1346,7 @@ class gui(QtGui.QWidget):
|
|||||||
|
|
||||||
def onPVPacket(self, charname):
|
def onPVPacket(self, charname):
|
||||||
exec open(AO2XPpath+"ao2xp_themes/"+get_option("General", "theme", "default")+"/theme.py")
|
exec open(AO2XPpath+"ao2xp_themes/"+get_option("General", "theme", "default")+"/theme.py")
|
||||||
|
self.gamewindow.center()
|
||||||
if not self.swapping:
|
if not self.swapping:
|
||||||
self.loadCharacter(charname)
|
self.loadCharacter(charname)
|
||||||
|
|
||||||
@ -1887,7 +1888,7 @@ class gui(QtGui.QWidget):
|
|||||||
#if f_char.lower() != self.charlist[f_char_id][0].lower():
|
#if f_char.lower() != self.charlist[f_char_id][0].lower():
|
||||||
# logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')'
|
# logcharname = self.charlist[f_char_id][0] + ' (' + f_char.decode("utf-8") + ')'
|
||||||
|
|
||||||
if self.m_chatmessage[SHOWNAME]:
|
if self.m_chatmessage[SHOWNAME] and self.m_chatmessage[SHOWNAME].lower() != f_char.lower():
|
||||||
try:
|
try:
|
||||||
logcharname += " ("+self.m_chatmessage[SHOWNAME].decode('utf-8')+")"
|
logcharname += " ("+self.m_chatmessage[SHOWNAME].decode('utf-8')+")"
|
||||||
except:
|
except:
|
||||||
@ -2589,14 +2590,15 @@ class gui(QtGui.QWidget):
|
|||||||
audio.sethandleattr(self.music, BASS_ATTRIB_VOL, self.musicslider.value() / 100.0)
|
audio.sethandleattr(self.music, BASS_ATTRIB_VOL, self.musicslider.value() / 100.0)
|
||||||
audio.playhandle(self.music, True)
|
audio.playhandle(self.music, True)
|
||||||
else:
|
else:
|
||||||
print "[audio] Couldn't play music. Error", audio.getbasserror()
|
error = audio.getbasserror()
|
||||||
|
print "[audio] Couldn't play music. Error", error
|
||||||
# Here comes the evil HTTPS hack for XP systems, but it also allows us to download and play modules and midis, because, why not?
|
# Here comes the evil HTTPS hack for XP systems, but it also allows us to download and play modules and midis, because, why not?
|
||||||
musext = os.path.splitext(basename(musl))[-1]
|
musext = os.path.splitext(basename(musl))[-1]
|
||||||
if musext in ['.mid', '.midi']:
|
if musext in ['.mid', '.midi']:
|
||||||
self.specialstream = 1
|
self.specialstream = 1
|
||||||
elif musext in ['.xm', '.mod', '.mo3', '.it', '.s3m', '.mtm', '.umx']:
|
elif musext in ['.xm', '.mod', '.mo3', '.it', '.s3m', '.mtm', '.umx']:
|
||||||
self.specialstream = 2
|
self.specialstream = 2
|
||||||
if musl.startswith("https") or self.specialstream:
|
if (musl.startswith("https") and error == 2) or self.specialstream:
|
||||||
print "[audio] Downloading music with urllib2"
|
print "[audio] Downloading music with urllib2"
|
||||||
self.download_thread = DownloadThread(self, mus)
|
self.download_thread = DownloadThread(self, mus)
|
||||||
self.download_thread.finished_signal.connect(self.playDownloadedMusic)
|
self.download_thread.finished_signal.connect(self.playDownloadedMusic)
|
||||||
|
@ -349,6 +349,7 @@ class lobby(QtGui.QWidget):
|
|||||||
|
|
||||||
def move_to_game(self, tcp, playerlist, charlist, musiclist, background, evidence, areas, features=[], oocjoin=[], hplist=[], webAO_bucket=""):
|
def move_to_game(self, tcp, playerlist, charlist, musiclist, background, evidence, areas, features=[], oocjoin=[], hplist=[], webAO_bucket=""):
|
||||||
self.gamewindow.showGame(tcp, playerlist, charlist, musiclist, background, evidence, areas, features, oocjoin, hplist, webAO_bucket)
|
self.gamewindow.showGame(tcp, playerlist, charlist, musiclist, background, evidence, areas, features, oocjoin, hplist, webAO_bucket)
|
||||||
|
self.gamewindow.center()
|
||||||
|
|
||||||
def lobby_sendchat(self):
|
def lobby_sendchat(self):
|
||||||
#text = self.lobbychatinput.text().toUtf8()
|
#text = self.lobbychatinput.text().toUtf8()
|
||||||
|
Loading…
Reference in New Issue
Block a user