2x display, ability to connect to modern servers, some bug fixes
@ -1,14 +1,14 @@
|
|||||||
self.gamewindow.setFixedSize(714, 668)
|
self.gamewindow.setFixedSize(820, 730)
|
||||||
|
|
||||||
self.ooclog.setGeometry(714 - 288, 0, 288, 256)
|
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())
|
||||||
self.oocnameinput.move(714 - 288, 256)
|
self.oocnameinput.move(814 - 288, 248)
|
||||||
self.oocinput.resize(176, self.oocinput.sizeHint().height())
|
self.oocinput.resize(176, self.oocinput.sizeHint().height())
|
||||||
self.oocinput.move(714 - 288 + self.oocnameinput.size().width(), 256)
|
self.oocinput.move(814 - 288 + self.oocnameinput.size().width(), 248)
|
||||||
self.ooclogin.resize(48, 20)
|
self.ooclogin.resize(48, 20)
|
||||||
self.ooclogin.move(714 - (self.ooclogin.size().width()), self.oocinput.y() + self.ooclogin.size().height())
|
self.ooclogin.move(814 - (self.ooclogin.size().width()), self.oocinput.y() + self.ooclogin.size().height())
|
||||||
|
|
||||||
self.musicitems.setGeometry(714 - 288, 348, 288, 320)
|
self.musicitems.setGeometry(814 - 288, 468, 288, 256)
|
||||||
|
|
||||||
self.icLog.setGeometry(8, 8, 714 - 304 - 22, 212)
|
self.icLog.setGeometry(8, 8, 714 - 304 - 22, 212)
|
||||||
|
|
||||||
@ -53,7 +53,7 @@ self.pair_order.setGeometry(self.pairoffset.x(), self.pair_order_l.y()-4, 80, se
|
|||||||
self.spacebartext.move(self.mocktext.x(), self.mocktext.y()+24)
|
self.spacebartext.move(self.mocktext.x(), self.mocktext.y()+24)
|
||||||
self.autocaps.move(self.spacebartext.x(), self.spacebartext.y()+24)
|
self.autocaps.move(self.spacebartext.x(), self.spacebartext.y()+24)
|
||||||
|
|
||||||
self.gametabs.move(8, 402)
|
self.gametabs.move(8, 468)
|
||||||
self.gametabs.resize(714 - 304, 256)
|
self.gametabs.resize(714 - 304, 256)
|
||||||
|
|
||||||
self.musicslider.setGeometry(self.oocnameinput.x(), self.oocnameinput.y()+24, 192, 16)
|
self.musicslider.setGeometry(self.oocnameinput.x(), self.oocnameinput.y()+24, 192, 16)
|
||||||
|
BIN
AO2XPbase/font/Ace_Name_Regular.ttf
Normal file
BIN
AO2XPbase/font/Igiari.ttf
Normal file
8
AO2XPbase/font/license.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
License for Igiari font
|
||||||
|
|
||||||
|
This font was created by Caveras with FontStruct and is licensed
|
||||||
|
under a Creative Commons Attribution Non-commercial Share Alike
|
||||||
|
license.
|
||||||
|
|
||||||
|
http://fontstruct.com/fontstructors/caveras
|
||||||
|
http://creativecommons.org/licenses/by-nc-sa/3.0/
|
31
AO2XPbase/font/readme.txt
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Igiari by Caveras - based on the original main text pixel font used in
|
||||||
|
the Ace Attorney video game series for Game Boy Advance and Nintendo DS
|
||||||
|
(Capcom, 2001-2011).
|
||||||
|
|
||||||
|
The font file in this archive was created by Caveras using FontStruct -
|
||||||
|
the free, online font-building tool. This font has a homepage where this
|
||||||
|
archive and other versions may be found:
|
||||||
|
http://fontstruct.com/fontstructors/caveras
|
||||||
|
|
||||||
|
It is also distributed over Caveras' website: http://www.caveras.net
|
||||||
|
|
||||||
|
Try FontStruct at http://fontstruct.com - It’s easy and it’s fun.
|
||||||
|
|
||||||
|
NOTE FOR FLASH USERS: FontStruct fonts (FontStructions) are optimized for
|
||||||
|
Flash. The font in this archive is a pixel font and best displayed at a
|
||||||
|
font-size of 8 and multiples of this number.
|
||||||
|
|
||||||
|
FontStruct is sponsored by FontShop. Visit them at http://fontshop.com.
|
||||||
|
FontShop is the original independent font retailer. We’ve been around since
|
||||||
|
the dawn of digital type. Whether you need the right font or need to create
|
||||||
|
the right font from scratch, let our 23 years of experience work for you.
|
||||||
|
|
||||||
|
FontStruct is copyright © 2013-2014 Rob Meek
|
||||||
|
|
||||||
|
LEGAL NOTICE:
|
||||||
|
In using this font you must comply with the licensing terms described in the
|
||||||
|
file “license.txt” included with this archive. If you redistribute the font
|
||||||
|
file in this archive, it must be accompanied by all the other files from this
|
||||||
|
archive, including this one.
|
||||||
|
|
||||||
|
Copyright © 2014 Caveras / Cliff Modes.
|
BIN
AO2XPbase/themes/AceAttorney2x/Ace_Name_Regular.ttf
Normal file
BIN
AO2XPbase/themes/AceAttorney2x/chat.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
AO2XPbase/themes/AceAttorney2x/chat_arrow.gif
Normal file
After Width: | Height: | Size: 412 B |
BIN
AO2XPbase/themes/AceAttorney2x/chat_arrow.webp
Normal file
After Width: | Height: | Size: 332 B |
BIN
AO2XPbase/themes/AceAttorney2x/chatbig.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
AO2XPbase/themes/AceAttorney2x/chatblank.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
AO2XPbase/themes/AceAttorney2x/chatmed.png
Normal file
After Width: | Height: | Size: 346 B |
86
AO2XPbase/themes/AceAttorney2x/courtroom_stylesheets.css
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
QFrame {
|
||||||
|
color: white;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
AOClockLabel {
|
||||||
|
border: 1px solid rgba(255, 255, 255, 135);
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: rgba(0, 0, 7, 135);
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox {
|
||||||
|
color: white;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox {
|
||||||
|
border: 1px solid black;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: darkgray;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
QAbstractItemView {
|
||||||
|
border: 0px solid darkgray;
|
||||||
|
background-color: transparent;
|
||||||
|
color: black;
|
||||||
|
border-radius: 0px;
|
||||||
|
selection-background-color: darkgreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
QListView {
|
||||||
|
color: black;
|
||||||
|
background-color: white;
|
||||||
|
selection-background-color: darkgreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit {
|
||||||
|
color: white;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar {
|
||||||
|
height: 12px;
|
||||||
|
width: 12px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::add-page {
|
||||||
|
background: rgba(200, 255, 255, 24)
|
||||||
|
}
|
||||||
|
|
||||||
|
QScrollBar::sub-page {
|
||||||
|
background: none
|
||||||
|
}
|
||||||
|
|
||||||
|
AOButton {
|
||||||
|
background: darkgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSlider::handle {
|
||||||
|
background: darkgray;
|
||||||
|
border: 1px solid #5c5c5c;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
QTextBrowser#ui_debug_log {
|
||||||
|
background-color: rgba(20, 20, 20, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
QLineEdit#ui_ic_chat_name {
|
||||||
|
color: white;
|
||||||
|
background-color: darkgray;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel#ui_size_label {
|
||||||
|
color: lime;
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
|
||||||
|
AOEmotePreview {
|
||||||
|
background: rgb(0, 0, 0);
|
||||||
|
background: qlineargradient(spread:pad, x1:0 y1:0, x2:0 y2:1, stop:0 slategray, stop:1 darkslategray);
|
||||||
|
}
|
BIN
AO2XPbase/themes/AceAttorney2x/courtroombackground.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
AO2XPbase/themes/AceAttorney2x/evidence_background.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
AO2XPbase/themes/AceAttorney2x/evidence_background_private.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
AO2XPbase/themes/AceAttorney2x/evidence_overlay.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
AO2XPbase/themes/AceAttorney2x/evidence_overlay_private.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
AO2XPbase/themes/AceAttorney2x/igiari-cyrillic.ttf
Normal file
BIN
AO2XPbase/themes/AceAttorney2x/music_display.png
Normal file
After Width: | Height: | Size: 142 B |
3
audio.py
@ -109,3 +109,6 @@ Set handle attribute
|
|||||||
"""
|
"""
|
||||||
if use_ctypes and type(value) == float: value = ctypes.c_float(value)
|
if use_ctypes and type(value) == float: value = ctypes.c_float(value)
|
||||||
return dll.BASS_ChannelSetAttribute(handle, attr, value)
|
return dll.BASS_ChannelSetAttribute(handle, attr, value)
|
||||||
|
|
||||||
|
def getbasserror():
|
||||||
|
return dll.BASS_ErrorGetCode()
|
24
bass_test.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import __builtin__
|
||||||
|
import audio as AUDIO
|
||||||
|
__builtin__.audio = AUDIO
|
||||||
|
del AUDIO
|
||||||
|
from pybass_constants import *
|
||||||
|
|
||||||
|
audio.init()
|
||||||
|
|
||||||
|
mus = "http://files.catbox.moe/nyp4xo.mp3"
|
||||||
|
|
||||||
|
music = audio.loadURLhandle(mus, 0, BASS_STREAM_BLOCK)
|
||||||
|
print "Trying to play", mus
|
||||||
|
|
||||||
|
if music:
|
||||||
|
audio.sethandleattr(music, BASS_ATTRIB_VOL, 1.0)
|
||||||
|
audio.playhandle(music, True)
|
||||||
|
else:
|
||||||
|
print "Couldn't play music. Error", audio.getbasserror()
|
||||||
|
|
||||||
|
while (1):
|
||||||
|
pass
|
||||||
|
|
||||||
|
audio.free()
|
||||||
|
sys.exit(0)
|
@ -1,4 +1,5 @@
|
|||||||
pyinstaller AO2XP.spec
|
pyinstaller --debug=all AO2XP.spec
|
||||||
pyinstaller AO2XP_console.spec
|
pyinstaller --debug=all AO2XP_console.spec
|
||||||
pyinstaller install_update.spec
|
pyinstaller --debug=all install_update.spec
|
||||||
move .\dist\* .
|
move .\dist\* .
|
||||||
|
pause
|
@ -1 +1 @@
|
|||||||
GAME_VERSION = "v1.6"
|
GAME_VERSION = "2.6.0"
|
149
gameview.py
@ -62,6 +62,9 @@ C_CYAN = 8
|
|||||||
|
|
||||||
DOWNLOAD_BLACKLIST = []
|
DOWNLOAD_BLACKLIST = []
|
||||||
|
|
||||||
|
VIEWPORT_W = 256*2
|
||||||
|
VIEWPORT_H = 192*2
|
||||||
|
|
||||||
def delay(msec):
|
def delay(msec):
|
||||||
dieTime = QtCore.QTime.currentTime().addMSecs(msec)
|
dieTime = QtCore.QTime.currentTime().addMSecs(msec)
|
||||||
|
|
||||||
@ -75,7 +78,12 @@ def encode_ao_str(text):
|
|||||||
|
|
||||||
def get_char_ini(char, section, value, default=""):
|
def get_char_ini(char, section, value, default=""):
|
||||||
tempini = ConfigParser()
|
tempini = ConfigParser()
|
||||||
tempini.read(AOpath + 'characters/' + char + '/char.ini')
|
with open(AOpath + 'characters/' + char + '/char.ini', 'r') as file:
|
||||||
|
for line in file:
|
||||||
|
try:
|
||||||
|
tempini.readfp(file)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
return ini.read_ini(tempini, section, value, default)
|
return ini.read_ini(tempini, section, value, default)
|
||||||
|
|
||||||
def get_option(section, value, default=""):
|
def get_option(section, value, default=""):
|
||||||
@ -209,12 +217,13 @@ class AOCharMovie(QtGui.QLabel):
|
|||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
QtGui.QLabel.__init__(self, parent)
|
QtGui.QLabel.__init__(self, parent)
|
||||||
|
|
||||||
self.resize(256, 192)
|
self.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
self.time_mod = 62
|
self.time_mod = 62
|
||||||
self.play_once = True
|
self.play_once = True
|
||||||
self.m_flipped = False
|
self.m_flipped = False
|
||||||
|
|
||||||
self.m_movie = QtGui.QMovie()
|
self.m_movie = QtGui.QMovie()
|
||||||
|
self.setScaledContents(True)
|
||||||
|
|
||||||
self.preanim_timer = QtCore.QTimer(self)
|
self.preanim_timer = QtCore.QTimer(self)
|
||||||
self.preanim_timer.setSingleShot(True)
|
self.preanim_timer.setSingleShot(True)
|
||||||
@ -542,7 +551,8 @@ class ZoomLines(QtGui.QLabel):
|
|||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
super(ZoomLines, self).__init__(parent)
|
super(ZoomLines, self).__init__(parent)
|
||||||
self.resize(256, 192)
|
self.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
|
self.setScaledContents(True)
|
||||||
self.movie = QtGui.QMovie()
|
self.movie = QtGui.QMovie()
|
||||||
self.movie.frameChanged.connect(self.frame_change)
|
self.movie.frameChanged.connect(self.frame_change)
|
||||||
|
|
||||||
@ -572,7 +582,8 @@ class WTCE_View(QtGui.QLabel):
|
|||||||
self.finalframe_timer = QtCore.QTimer()
|
self.finalframe_timer = QtCore.QTimer()
|
||||||
self.finalframe_timer.setSingleShot(False)
|
self.finalframe_timer.setSingleShot(False)
|
||||||
self.finalframe_timer.timeout.connect(self.finished)
|
self.finalframe_timer.timeout.connect(self.finished)
|
||||||
self.resize(256, 192)
|
self.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
|
self.setScaledContents(True)
|
||||||
|
|
||||||
def frame_change(self, frame):
|
def frame_change(self, frame):
|
||||||
if self.movie.state() != QtGui.QMovie.Running:
|
if self.movie.state() != QtGui.QMovie.Running:
|
||||||
@ -636,6 +647,9 @@ class gui(QtGui.QWidget):
|
|||||||
charini = ConfigParser()
|
charini = ConfigParser()
|
||||||
chatmsg = ''
|
chatmsg = ''
|
||||||
charid = -1
|
charid = -1
|
||||||
|
|
||||||
|
wtcesfx = None
|
||||||
|
|
||||||
#ICchat = QtCore.pyqtSignal(str, str, str, str, str, str, int, int, int, int, int, int, int, int)
|
#ICchat = QtCore.pyqtSignal(str, str, str, str, str, str, int, int, int, int, int, int, int, int)
|
||||||
#ICchat = QtCore.pyqtSignal(list)
|
#ICchat = QtCore.pyqtSignal(list)
|
||||||
WTCEsignal = QtCore.pyqtSignal(str, int)
|
WTCEsignal = QtCore.pyqtSignal(str, int)
|
||||||
@ -667,9 +681,10 @@ class gui(QtGui.QWidget):
|
|||||||
self.background = 'default'
|
self.background = 'default'
|
||||||
|
|
||||||
self.viewport = QtGui.QWidget(self)
|
self.viewport = QtGui.QWidget(self)
|
||||||
self.viewport.resize(256, 192)
|
self.viewport.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
|
|
||||||
self.court = QtGui.QLabel(self.viewport)
|
self.court = QtGui.QLabel(self.viewport)
|
||||||
|
self.court.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
self.zoom = ZoomLines(self.viewport)
|
self.zoom = ZoomLines(self.viewport)
|
||||||
|
|
||||||
self.char = AOCharMovie(self.viewport)
|
self.char = AOCharMovie(self.viewport)
|
||||||
@ -678,23 +693,33 @@ class gui(QtGui.QWidget):
|
|||||||
self.sidechar.hide()
|
self.sidechar.hide()
|
||||||
|
|
||||||
self.bench = QtGui.QLabel(self.viewport)
|
self.bench = QtGui.QLabel(self.viewport)
|
||||||
|
self.bench.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
bench = QtGui.QPixmap(AOpath + 'background/default/defensedesk.png')
|
bench = QtGui.QPixmap(AOpath + 'background/default/defensedesk.png')
|
||||||
self.court.setPixmap(QtGui.QPixmap(AOpath + 'background/default/defenseempty.png'))
|
self.court.setPixmap(QtGui.QPixmap(AOpath + 'background/default/defenseempty.png'))
|
||||||
self.bench.setPixmap(bench)
|
self.bench.setPixmap(bench)
|
||||||
|
|
||||||
self.effectview = AOMovie(self.viewport)
|
self.effectview = AOMovie(self.viewport)
|
||||||
|
|
||||||
|
font_db = QtGui.QFontDatabase()
|
||||||
|
font_db.addApplicationFont(AO2XPpath + 'font/Igiari.ttf')
|
||||||
|
font_db.addApplicationFont(AO2XPpath + 'font/Ace_Name_Regular.ttf')
|
||||||
|
name_font = QtGui.QFont("Ace Name")
|
||||||
|
name_font.setPointSize(12)
|
||||||
|
ao2text_font = QtGui.QFont("Igiari")
|
||||||
|
ao2text_font.setPointSize(24)
|
||||||
|
|
||||||
self.chatbox = QtGui.QLabel(self.viewport)
|
self.chatbox = QtGui.QLabel(self.viewport)
|
||||||
chatbox = QtGui.QPixmap(AO2XPpath + 'themes/default/chatmed.png')
|
chatbox = QtGui.QPixmap(AO2XPpath + 'themes/AceAttorney2x/chatbig.png')
|
||||||
|
#chatbox = QtGui.QPixmap(AO2XPpath + 'themes/default/chatmed.png')
|
||||||
self.chatboxheight = chatbox.size().height()
|
self.chatboxheight = chatbox.size().height()
|
||||||
self.chatbox.setPixmap(chatbox)
|
self.chatbox.setPixmap(chatbox)
|
||||||
self.chatbox.move(0, 192 - self.chatboxheight)
|
self.chatbox.move(0, VIEWPORT_H - self.chatboxheight)
|
||||||
|
|
||||||
self.text = QtGui.QLabel(self.chatbox)
|
self.text = QtGui.QLabel(self.chatbox)
|
||||||
self.text.setWordWrap(True)
|
self.text.setWordWrap(True)
|
||||||
self.text.resize(250, 96)
|
self.text.resize(VIEWPORT_W, 96)
|
||||||
self.text.move(6, 20)
|
self.text.move(6, 20)
|
||||||
self.text.setStyleSheet('color: white')
|
self.text.setStyleSheet('color: white;')
|
||||||
self.text.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
self.text.setAlignment(QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop)
|
||||||
|
|
||||||
self.ao2text = QtGui.QTextEdit(self.chatbox)
|
self.ao2text = QtGui.QTextEdit(self.chatbox)
|
||||||
@ -702,19 +727,24 @@ class gui(QtGui.QWidget):
|
|||||||
self.ao2text.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
self.ao2text.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
self.ao2text.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
self.ao2text.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
self.ao2text.setReadOnly(True)
|
self.ao2text.setReadOnly(True)
|
||||||
self.ao2text.setGeometry(2, 16, 240+10, 96)
|
self.ao2text.setGeometry(16, 32, VIEWPORT_W - 16, 112)
|
||||||
self.ao2text.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
self.ao2text.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
|
||||||
self.ao2text.setStyleSheet("background-color: rgba(0, 0, 0, 0);"
|
self.ao2text.setStyleSheet("background-color: rgba(0, 0, 0, 0); color: white;")
|
||||||
"color: white")
|
self.ao2text.setFont(ao2text_font)
|
||||||
|
|
||||||
self.name = QtGui.QLabel(self.chatbox)
|
self.name = QtGui.QLabel(self.chatbox)
|
||||||
self.name.setStyleSheet('color: white')
|
self.name.setStyleSheet('color: white')
|
||||||
self.name.move(5, 0)
|
self.name.move(16, 0)
|
||||||
self.name.resize(248, self.name.sizeHint().height())
|
self.name.resize(248, 32)
|
||||||
|
#self.name.resize(248, self.name.sizeHint().height())
|
||||||
|
self.name.setFont(name_font)
|
||||||
|
|
||||||
self.wtceview = WTCE_View(self)
|
self.wtceview = WTCE_View(self)
|
||||||
self.WTCEsignal.connect(self.wtceview.showWTCE)
|
self.WTCEsignal.connect(self.wtceview.showWTCE)
|
||||||
|
|
||||||
self.objectionview = AOMovie(self.viewport)
|
self.objectionview = AOMovie(self.viewport)
|
||||||
|
self.objectionview.resize(VIEWPORT_W, VIEWPORT_H)
|
||||||
|
self.objectionview.setScaledContents(True)
|
||||||
self.objectionview.done.connect(self.objection_done)
|
self.objectionview.done.connect(self.objection_done)
|
||||||
|
|
||||||
self.whiteflashlab = QtGui.QLabel(self.viewport)
|
self.whiteflashlab = QtGui.QLabel(self.viewport)
|
||||||
@ -859,76 +889,77 @@ class gui(QtGui.QWidget):
|
|||||||
self.gametabs.addTab(self.gametab_misc, 'Misc')
|
self.gametabs.addTab(self.gametab_misc, 'Misc')
|
||||||
|
|
||||||
self.icchatinput = QtGui.QLineEdit(self)
|
self.icchatinput = QtGui.QLineEdit(self)
|
||||||
self.icchatinput.setGeometry(0, 192, 256, 23)
|
self.icchatinput.setGeometry(0, VIEWPORT_H, VIEWPORT_W, 23)
|
||||||
self.icchatinput.returnPressed.connect(self.onICreturn)
|
self.icchatinput.returnPressed.connect(self.onICreturn)
|
||||||
self.icchatinput.setPlaceholderText('Game chat')
|
self.icchatinput.setPlaceholderText('Game chat')
|
||||||
|
|
||||||
self.emotedropdown = QtGui.QComboBox(self)
|
self.emotedropdown = QtGui.QComboBox(self)
|
||||||
self.emotedropdown.setGeometry(192, 344, 128, 20)
|
self.emotedropdown.setGeometry(164 - 28, 344 + 66 + 4, 72, 20)
|
||||||
self.emotedropdown.currentIndexChanged.connect(partial(self.changeEmote, True))
|
self.emotedropdown.currentIndexChanged.connect(partial(self.changeEmote, True))
|
||||||
|
|
||||||
self.colordropdown = QtGui.QComboBox(self)
|
self.colordropdown = QtGui.QComboBox(self)
|
||||||
self.colordropdown.setGeometry(192, 376, 72, 20)
|
self.colordropdown.setGeometry(self.emotedropdown.x(), 376 + 64, 72, 20)
|
||||||
self.colordropdown.currentIndexChanged.connect(self.setChatColor)
|
self.colordropdown.currentIndexChanged.connect(self.setChatColor)
|
||||||
|
|
||||||
self.posdropdown = QtGui.QComboBox(self)
|
self.posdropdown = QtGui.QComboBox(self)
|
||||||
self.posdropdown.addItems(["def", "pro", "wit", "hld", "hlp", "jud"])
|
self.posdropdown.addItems(["def", "pro", "wit", "hld", "hlp", "jud"])
|
||||||
self.posdropdown.setGeometry(self.emotedropdown.x() + self.emotedropdown.size().width() + 8, 344, 64, 20)
|
self.posdropdown.setGeometry(self.emotedropdown.x() + self.emotedropdown.size().width() + 4, self.emotedropdown.y(), 72, 20)
|
||||||
self.posdropdown.currentIndexChanged.connect(self.setPosition)
|
self.posdropdown.currentIndexChanged.connect(self.setPosition)
|
||||||
|
|
||||||
self.flipbutton = QtGui.QCheckBox(self)
|
self.flipbutton = QtGui.QCheckBox(self)
|
||||||
self.flipbutton.stateChanged.connect(self.changeFlipCheck)
|
self.flipbutton.stateChanged.connect(self.changeFlipCheck)
|
||||||
self.flipbutton.setText('Mirror emote')
|
self.flipbutton.setText('Mirror')
|
||||||
self.flipbutton.resize(self.flipbutton.sizeHint())
|
self.flipbutton.resize(self.flipbutton.sizeHint())
|
||||||
self.flipbutton.move(272, 240)
|
self.flipbutton.move(self.posdropdown.x() + self.posdropdown.width() + 4, self.colordropdown.y() - 5)
|
||||||
|
|
||||||
self.sfxbutton = QtGui.QCheckBox(self)
|
self.sfxbutton = QtGui.QCheckBox(self)
|
||||||
self.sfxbutton.setChecked(True)
|
self.sfxbutton.setChecked(True)
|
||||||
self.sfxbutton.stateChanged.connect(self.changeSfxCheck)
|
self.sfxbutton.stateChanged.connect(self.changeSfxCheck)
|
||||||
self.sfxbutton.setText('Play pre-animation')
|
self.sfxbutton.setText('Play pre-animation')
|
||||||
self.sfxbutton.resize(self.sfxbutton.sizeHint())
|
self.sfxbutton.resize(self.sfxbutton.sizeHint())
|
||||||
self.sfxbutton.move(272, 272-12)
|
self.sfxbutton.move(self.flipbutton.x(), self.flipbutton.y() + 14)
|
||||||
|
|
||||||
self.nointerruptbtn = QtGui.QCheckBox(self)
|
self.nointerruptbtn = QtGui.QCheckBox(self)
|
||||||
self.nointerruptbtn.setChecked(False)
|
self.nointerruptbtn.setChecked(False)
|
||||||
self.nointerruptbtn.setText('No Interrupt')
|
self.nointerruptbtn.setText('No Interrupt')
|
||||||
self.nointerruptbtn.resize(self.nointerruptbtn.sizeHint())
|
self.nointerruptbtn.resize(self.nointerruptbtn.sizeHint())
|
||||||
self.nointerruptbtn.move(272, 272+8)
|
self.nointerruptbtn.move(self.flipbutton.x() + 140, self.flipbutton.y())
|
||||||
|
|
||||||
# AO 2.8
|
# AO 2.8
|
||||||
self.additivebtn = QtGui.QCheckBox(self)
|
self.additivebtn = QtGui.QCheckBox(self)
|
||||||
self.additivebtn.setChecked(False)
|
self.additivebtn.setChecked(False)
|
||||||
self.additivebtn.setText('Additive text')
|
self.additivebtn.setText('Additive text')
|
||||||
self.additivebtn.resize(self.additivebtn.sizeHint())
|
self.additivebtn.resize(self.additivebtn.sizeHint())
|
||||||
self.additivebtn.move(272+60, 272+28)
|
self.additivebtn.move(self.nointerruptbtn.x(), self.sfxbutton.y())
|
||||||
self.additivebtn.clicked.connect(self.onAdditiveCheck)
|
self.additivebtn.clicked.connect(self.onAdditiveCheck)
|
||||||
|
|
||||||
self.deskbtn = QtGui.QCheckBox(self)
|
self.deskbtn = QtGui.QCheckBox(self)
|
||||||
self.deskbtn.setChecked(True)
|
self.deskbtn.setChecked(True)
|
||||||
self.deskbtn.setText('Desk')
|
self.deskbtn.setText('Desk')
|
||||||
self.deskbtn.resize(self.nointerruptbtn.sizeHint())
|
self.deskbtn.resize(self.nointerruptbtn.sizeHint())
|
||||||
self.deskbtn.move(self.flipbutton.x()+96, self.flipbutton.y())
|
self.deskbtn.move(self.flipbutton.x()+70, self.flipbutton.y())
|
||||||
|
|
||||||
self.effectdropdown = QtGui.QComboBox(self)
|
self.effectdropdown = QtGui.QComboBox(self)
|
||||||
self.effectdropdown.setGeometry(272+60, 272+28+18, 88, 20)
|
self.effectdropdown.setGeometry(self.posdropdown.x(), self.colordropdown.y(), 72, 20)
|
||||||
|
|
||||||
self.changechar = QtGui.QPushButton(self)
|
|
||||||
self.changechar.setText('Switch character')
|
|
||||||
self.changechar.setGeometry(10, 344, 121, 23)
|
|
||||||
self.changechar.clicked.connect(self.onClick_changeChar)
|
|
||||||
self.callmodbtn = QtGui.QPushButton(self)
|
self.callmodbtn = QtGui.QPushButton(self)
|
||||||
self.callmodbtn.setText('Call mod')
|
self.callmodbtn.setText('Call mod')
|
||||||
self.callmodbtn.setGeometry(10, 376, 71, 23)
|
self.callmodbtn.setGeometry(10, 376 + 62, 60, 23)
|
||||||
self.callmodbtn.clicked.connect(self.onClick_callMod)
|
self.callmodbtn.clicked.connect(self.onClick_callMod)
|
||||||
|
|
||||||
self.settingsbtn = QtGui.QPushButton("Settings", self)
|
self.settingsbtn = QtGui.QPushButton("Settings", self)
|
||||||
self.settingsbtn.setGeometry(self.callmodbtn.x()+self.callmodbtn.size().width()+8, 376, self.settingsbtn.sizeHint().width(), 23)
|
self.settingsbtn.setGeometry(self.callmodbtn.x()+self.callmodbtn.size().width(), 376 + 62, self.callmodbtn.width(), 23)
|
||||||
self.settingsbtn.clicked.connect(self.gamewindow.showSettings)
|
self.settingsbtn.clicked.connect(self.gamewindow.showSettings)
|
||||||
|
|
||||||
spacing = 9
|
self.changechar = QtGui.QPushButton(self)
|
||||||
|
self.changechar.setText('Switch character')
|
||||||
|
self.changechar.setGeometry(10, 344 + 66 + 4, self.callmodbtn.size().width() + self.settingsbtn.size().width(), 23)
|
||||||
|
self.changechar.clicked.connect(self.onClick_changeChar)
|
||||||
|
|
||||||
|
spacing = 1
|
||||||
x_mod_count = y_mod_count = 0
|
x_mod_count = y_mod_count = 0
|
||||||
left, top = (10, 218)
|
left, top = (10 + 516, 218+190-24)
|
||||||
width, height = (236, 98)
|
width, height = (288, 98)
|
||||||
columns = (width - 40) / (spacing + 40) + 1
|
columns = (width - 40) / (spacing + 40) + 1
|
||||||
rows = (height - 40) / (spacing + 40) + 1
|
rows = (height - 40) / (spacing + 40) + 1
|
||||||
self.max_emotes_on_page = columns * rows
|
self.max_emotes_on_page = columns * rows
|
||||||
@ -944,31 +975,33 @@ class gui(QtGui.QWidget):
|
|||||||
self.emotebuttons[i].show()
|
self.emotebuttons[i].show()
|
||||||
|
|
||||||
self.current_emote_page = 0
|
self.current_emote_page = 0
|
||||||
self.prevemotepage = BackEmoteButton(self, 0, 253)
|
self.prevemotepage = BackEmoteButton(self, 520, 253+190-28)
|
||||||
self.prevemotepage.hide()
|
self.prevemotepage.hide()
|
||||||
self.nextemotepage = NextEmoteButton(self, 236, 253)
|
self.nextemotepage = NextEmoteButton(self, 282 + 516, 253+190-28)
|
||||||
self.nextemotepage.show()
|
self.nextemotepage.show()
|
||||||
self.realizationbtn = buttons.AOToggleButton(self, 265, 192, "realization")
|
self.realizationbtn = buttons.AOToggleButton(self, 265 + 164, 192 + 304, "realization")
|
||||||
self.realizationbtn.clicked.connect(self.onRealizationButton)
|
self.realizationbtn.clicked.connect(self.onRealizationButton)
|
||||||
self.realizationsnd = audio.loadhandle(False, AOpath + 'sounds/general/sfx-realization.wav', 0, 0, 0)
|
self.realizationsnd = audio.loadhandle(False, AOpath + 'sounds/general/sfx-realization.wav', 0, 0, 0)
|
||||||
self.shakebtn = buttons.AOToggleButton(self, 265+42, 192, "screenshake") # AO 2.8
|
self.shakebtn = buttons.AOToggleButton(self, 265+42 + 164, 192 + 304, "screenshake") # AO 2.8
|
||||||
self.customobject = buttons.CustomObjection(self, 250, 312)
|
self.customobject = buttons.CustomObjection(self, 250 + 516 - 30, 312 + 40)
|
||||||
self.holditbtn = buttons.Objections(self, 10, 312, 1)
|
self.takethatbtn = buttons.Objections(self, 170+ 516 - 20, 312 + 40, 3)
|
||||||
self.objectbtn = buttons.Objections(self, 90, 312, 2)
|
self.objectbtn = buttons.Objections(self, 90+ 516 - 10, 312 + 40, 2)
|
||||||
self.takethatbtn = buttons.Objections(self, 170, 312, 3)
|
self.holditbtn = buttons.Objections(self, 10+ 516, 312 + 40, 1)
|
||||||
self.objectsnd = None
|
self.objectsnd = None
|
||||||
self.defensebar = buttons.PenaltyBars(self, 1)
|
self.defensebar = buttons.PenaltyBars(self, 1)
|
||||||
self.prosecutionbar = buttons.PenaltyBars(self, 2)
|
self.prosecutionbar = buttons.PenaltyBars(self, 2)
|
||||||
self.defensebar.moveBar(265, 164)
|
self.defensebar.moveBar(265 + 164, 164 + 304)
|
||||||
self.prosecutionbar.moveBar(265, 178)
|
self.prosecutionbar.moveBar(265 + 164, 178 + 304)
|
||||||
self.defensebar.minusClicked.connect(self.penaltyBarMinus)
|
self.defensebar.minusClicked.connect(self.penaltyBarMinus)
|
||||||
self.defensebar.plusClicked.connect(self.penaltyBarPlus)
|
self.defensebar.plusClicked.connect(self.penaltyBarPlus)
|
||||||
self.prosecutionbar.minusClicked.connect(self.penaltyBarMinus)
|
self.prosecutionbar.minusClicked.connect(self.penaltyBarMinus)
|
||||||
self.prosecutionbar.plusClicked.connect(self.penaltyBarPlus)
|
self.prosecutionbar.plusClicked.connect(self.penaltyBarPlus)
|
||||||
self.wtcebtn_1 = buttons.WTCEbuttons(self, 256, 0, 0)
|
|
||||||
self.wtcebtn_2 = buttons.WTCEbuttons(self, 256 + self.wtcebtn_1.size().width(), 0, 1)
|
self.wtcebtn_1 = buttons.WTCEbuttons(self, 429, 544, 0)
|
||||||
self.notguiltybtn = buttons.WTCEbuttons(self, 256, self.wtcebtn_1.size().height(), 2, 0)
|
self.wtcebtn_2 = buttons.WTCEbuttons(self, self.wtcebtn_1.x(), self.wtcebtn_1.y() + self.wtcebtn_1.size().height(), 1)
|
||||||
self.guiltybtn = buttons.WTCEbuttons(self, 256 + self.notguiltybtn.size().width(), self.wtcebtn_2.size().height(), 2, 1)
|
self.notguiltybtn = buttons.WTCEbuttons(self, self.wtcebtn_1.x(), self.wtcebtn_2.y() + self.wtcebtn_2.size().height(), 2, 0)
|
||||||
|
self.guiltybtn = buttons.WTCEbuttons(self, self.wtcebtn_1.x(), self.notguiltybtn.y() + self.notguiltybtn.size().height(), 2, 1)
|
||||||
|
|
||||||
self.wtcebtn_1.clicked.connect(self.WTCEbuttonPressed)
|
self.wtcebtn_1.clicked.connect(self.WTCEbuttonPressed)
|
||||||
self.wtcebtn_2.clicked.connect(self.WTCEbuttonPressed)
|
self.wtcebtn_2.clicked.connect(self.WTCEbuttonPressed)
|
||||||
self.notguiltybtn.clicked.connect(self.WTCEbuttonPressed)
|
self.notguiltybtn.clicked.connect(self.WTCEbuttonPressed)
|
||||||
@ -985,7 +1018,7 @@ class gui(QtGui.QWidget):
|
|||||||
self.showname = ""
|
self.showname = ""
|
||||||
self.shownameedit = QtGui.QLineEdit(self)
|
self.shownameedit = QtGui.QLineEdit(self)
|
||||||
self.shownameedit.textChanged.connect(self.onChangeShowname)
|
self.shownameedit.textChanged.connect(self.onChangeShowname)
|
||||||
self.shownameedit.setGeometry(self.colordropdown.x()+self.colordropdown.width()+8, self.colordropdown.y(), 144, 20)
|
self.shownameedit.setGeometry(self.posdropdown.x() + self.posdropdown.width() + 4, self.posdropdown.y(), 168 + 56, 20)
|
||||||
self.shownameedit.setPlaceholderText("Showname")
|
self.shownameedit.setPlaceholderText("Showname")
|
||||||
|
|
||||||
self.musicslider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
|
self.musicslider = QtGui.QSlider(QtCore.Qt.Horizontal, self)
|
||||||
@ -1638,8 +1671,8 @@ class gui(QtGui.QWidget):
|
|||||||
|
|
||||||
bgimg = QtGui.QImage(AOpath + 'background/' + bg + '/' + bgfile[1] + '.png')
|
bgimg = QtGui.QImage(AOpath + 'background/' + bg + '/' + bgfile[1] + '.png')
|
||||||
if not bgimg.isNull():
|
if not bgimg.isNull():
|
||||||
if bgimg.size().width() != 256 or bgimg.size().height() != 192:
|
if bgimg.size().width() != VIEWPORT_W or bgimg.size().height() != VIEWPORT_H:
|
||||||
setattr(self, bgfile[0], QtGui.QPixmap.fromImage(bgimg.scaled(256, 192, transformMode=QtCore.Qt.SmoothTransformation)))
|
setattr(self, bgfile[0], QtGui.QPixmap.fromImage(bgimg.scaled(VIEWPORT_W, VIEWPORT_H, transformMode=QtCore.Qt.SmoothTransformation)))
|
||||||
else:
|
else:
|
||||||
setattr(self, bgfile[0], QtGui.QPixmap.fromImage(bgimg))
|
setattr(self, bgfile[0], QtGui.QPixmap.fromImage(bgimg))
|
||||||
else:
|
else:
|
||||||
@ -1783,12 +1816,12 @@ class gui(QtGui.QWidget):
|
|||||||
if side == 'def':
|
if side == 'def':
|
||||||
self.court.setPixmap(self.side_def)
|
self.court.setPixmap(self.side_def)
|
||||||
self.bench.setPixmap(self.bench_def)
|
self.bench.setPixmap(self.bench_def)
|
||||||
self.bench.move(0, 192 - self.bench_def.size().height())
|
self.bench.move(0, VIEWPORT_H - self.bench_def.size().height())
|
||||||
self.presentedevi.move(170, 16)
|
self.presentedevi.move(170, 16)
|
||||||
elif side == 'pro':
|
elif side == 'pro':
|
||||||
self.court.setPixmap(self.side_pro)
|
self.court.setPixmap(self.side_pro)
|
||||||
self.bench.setPixmap(self.bench_pro)
|
self.bench.setPixmap(self.bench_pro)
|
||||||
self.bench.move(256 - self.bench_pro.size().width(), 192 - self.bench_pro.size().height())
|
self.bench.move(VIEWPORT_W - self.bench_pro.size().width(), VIEWPORT_H - self.bench_pro.size().height())
|
||||||
self.presentedevi.move(16, 16)
|
self.presentedevi.move(16, 16)
|
||||||
elif side == 'wit':
|
elif side == 'wit':
|
||||||
self.court.setPixmap(self.side_wit)
|
self.court.setPixmap(self.side_wit)
|
||||||
@ -2368,13 +2401,14 @@ class gui(QtGui.QWidget):
|
|||||||
audio.freehandle(self.music)
|
audio.freehandle(self.music)
|
||||||
|
|
||||||
if exists(AOpath + 'sounds/music/' + mus):
|
if exists(AOpath + 'sounds/music/' + mus):
|
||||||
self.music = audio.loadhandle(False, AOpath + 'sounds/music/' + mus, 0, 0, 0)
|
self.music = audio.loadhandle(False, AOpath + 'sounds/music/' + mus, 0, 0, BASS_SAMPLE_LOOP)
|
||||||
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)
|
||||||
|
|
||||||
elif ini.read_ini_bool("AO2XP.ini", "General", "download music", True):
|
elif ini.read_ini_bool("AO2XP.ini", "General", "download music", True):
|
||||||
if mus.lower().startswith("http"):
|
if mus.lower().startswith("http"):
|
||||||
self.music = audio.loadURLhandle(mus, 0, BASS_STREAM_BLOCK)
|
self.music = audio.loadURLhandle(mus, 0, BASS_STREAM_BLOCK | BASS_SAMPLE_LOOP)
|
||||||
|
print "Trying to play", mus.lower()
|
||||||
else:
|
else:
|
||||||
for bucket in buckets:
|
for bucket in buckets:
|
||||||
if not bucket: continue
|
if not bucket: continue
|
||||||
@ -2385,6 +2419,8 @@ class gui(QtGui.QWidget):
|
|||||||
if self.music:
|
if self.music:
|
||||||
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:
|
||||||
|
print "Couldn't play music. Error", audio.getbasserror()
|
||||||
|
|
||||||
def stopMusic(self):
|
def stopMusic(self):
|
||||||
if self.music:
|
if self.music:
|
||||||
@ -2437,7 +2473,7 @@ class gui(QtGui.QWidget):
|
|||||||
self.colordropdown.clear()
|
self.colordropdown.clear()
|
||||||
self.colordropdown.addItems(['white', 'green', 'red', 'orange', 'blue'])
|
self.colordropdown.addItems(['white', 'green', 'red', 'orange', 'blue'])
|
||||||
if "yellowtext" in features:
|
if "yellowtext" in features:
|
||||||
self.colordropdown.addItems(['yellow', 'gay pride', 'pink', 'cyan'])
|
self.colordropdown.addItems(['yellow', 'rainbow', 'pink', 'cyan'])
|
||||||
self.colordropdown.setCurrentIndex(self.mychatcolor)
|
self.colordropdown.setCurrentIndex(self.mychatcolor)
|
||||||
|
|
||||||
for hp in hplist:
|
for hp in hplist:
|
||||||
@ -2825,6 +2861,7 @@ class TCP_Thread(QtCore.QThread):
|
|||||||
elif header == 'RT':
|
elif header == 'RT':
|
||||||
testimony = network[1]
|
testimony = network[1]
|
||||||
wtcefile = AOpath+"sounds/general/sfx-testimony2"
|
wtcefile = AOpath+"sounds/general/sfx-testimony2"
|
||||||
|
if self.parent.wtcesfx:
|
||||||
audio.freehandle(self.parent.wtcesfx)
|
audio.freehandle(self.parent.wtcesfx)
|
||||||
|
|
||||||
if testimony == 'judgeruling':
|
if testimony == 'judgeruling':
|
||||||
|
2882
gameview_scaled.py
Normal file
@ -517,7 +517,7 @@ class AOServerInfo(QtCore.QThread):
|
|||||||
print self.webAO_bucket
|
print self.webAO_bucket
|
||||||
|
|
||||||
elif header == "ID":
|
elif header == "ID":
|
||||||
self.tcp.send("ID#AO2XP#%s#%%" % GAME_VERSION[1:]) # need to send this to tsuserver3 servers in order to get feature list (FL)
|
self.tcp.send("ID#AO2XP#%s#%%" % "2.11.0") # need to send this to tsuserver3 servers in order to get feature list (FL)
|
||||||
|
|
||||||
elif header == "FL":
|
elif header == "FL":
|
||||||
features = network[1:]
|
features = network[1:]
|
||||||
|
@ -100,6 +100,7 @@ if platform.system() == "Windows":
|
|||||||
|
|
||||||
print "installing pyqt4"
|
print "installing pyqt4"
|
||||||
pip_install('PyQt4-4.11.4-cp27-cp27m-win32.whl')
|
pip_install('PyQt4-4.11.4-cp27-cp27m-win32.whl')
|
||||||
|
raw_input("Press Enter to continue...")
|
||||||
|
|
||||||
elif platform.system() == "Darwin":
|
elif platform.system() == "Darwin":
|
||||||
print "installing pyobjc"
|
print "installing pyobjc"
|
||||||
|