diff --git a/AO2XPbase/ao2xp_themes/default/theme.py b/AO2XPbase/ao2xp_themes/default/theme.py index 477d5dc..3de507a 100644 --- a/AO2XPbase/ao2xp_themes/default/theme.py +++ b/AO2XPbase/ao2xp_themes/default/theme.py @@ -1,10 +1,9 @@ self.gamewindow.setFixedSize(820, 730) -self.text.setGeometry(16, 32, VIEWPORT_W - 32, 112) -self.text.setStyleSheet('background-color: rgba(0, 0, 0, 0); color: white;') - self.ao2text.setGeometry(16, 32, VIEWPORT_W - 32, 112) self.ao2text.setStyleSheet("background-color: rgba(0, 0, 0, 0); color: white;") +self.text.setGeometry(16, 32, VIEWPORT_W - 32, 112) +self.text.setStyleSheet("background-color: rgba(0, 0, 0, 0); color: white;") self.name.setStyleSheet('color: white') self.name.move(16, -1) diff --git a/bass_test.py b/bass_test.py new file mode 100644 index 0000000..4ce23b1 --- /dev/null +++ b/bass_test.py @@ -0,0 +1,26 @@ +import __builtin__ +import audio as AUDIO +__builtin__.audio = AUDIO +del AUDIO +from pybass_constants import * + +from urllib2 import Request, urlopen + +audio.init() + +url = 'one_last_dance.mid' +music = audio.loadMIDI(False, url, 0, 0, BASS_SAMPLE_LOOP) + +print "Trying to play", url + +if music: + audio.sethandleattr(music, BASS_ATTRIB_VOL, 1.0) + audio.playhandle(music, False) +else: + print "Couldn't play music. Error", audio.getbasserror() +print "Error?", audio.getbasserror() + +while 1: + pass + + diff --git a/gameview.py b/gameview.py index 1026e2c..46641dd 100644 --- a/gameview.py +++ b/gameview.py @@ -62,7 +62,8 @@ C_YELLOW = 5 C_PINK = 6 C_CYAN = 7 C_GRAY = 8 -C_RAINBOW = 9 # proprietary +C_RAINBOW = 9 +C_BLACK = 10 DOWNLOAD_BLACKLIST = [] @@ -1182,7 +1183,7 @@ class gui(QtGui.QWidget): self.sidechar.move(self.sidechar.xx, self.sidechar.yy, True) self.chatbox.move(0, VIEWPORT_H-self.chatboxheight) self.ao2text.move(16, 32) - self.text.move(16,-1) + self.text.move(16,32) self.screenshake.stop() def onAdditiveCheck(self): @@ -2166,6 +2167,8 @@ class gui(QtGui.QWidget): color = QtGui.QColor(0, 255, 255) elif textcolor == 8: color = QtGui.QColor(200, 200, 200) + elif textcolor == 10: + color = QtGui.QColor(0, 0, 0) else: color = QtGui.QColor(255, 255, 255) @@ -2598,7 +2601,9 @@ class gui(QtGui.QWidget): elif f_character == "(" and not self.next_character_is_not_special: #blue. self.inline_color_stack.append(INLINE_BLUE) - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) self.inline_blue_depth += 1 if not self.entire_message_is_blue and self.anim_state != 4: @@ -2609,7 +2614,9 @@ class gui(QtGui.QWidget): elif f_character == ")" and not self.next_character_is_not_special and self.inline_color_stack: if self.inline_color_stack[-1] == INLINE_BLUE: del self.inline_color_stack[-1] - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) if self.inline_blue_depth > 0: self.inline_blue_depth -= 1 @@ -2625,12 +2632,16 @@ class gui(QtGui.QWidget): elif f_character == "[" and not self.next_character_is_not_special: #gray. self.inline_color_stack.append(INLINE_GRAY) - self.ao2text.insertHtml("" + f_character + "") - + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) + elif f_character == "]" and not self.next_character_is_not_special and self.inline_color_stack: if self.inline_color_stack[-1] == INLINE_GRAY: del self.inline_color_stack[-1] - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) else: self.next_character_is_not_special = True self.tick_pos -= 1 @@ -2664,7 +2675,7 @@ class gui(QtGui.QWidget): self.next_character_is_not_special = False elif f_character == "n" and self.next_character_is_not_special: # newline - self.text.setText(self.text.text() + "\n") + self.text.insertPlainText("\n") self.ao2text.insertPlainText("\n") self.next_character_is_not_special = False @@ -2673,16 +2684,27 @@ class gui(QtGui.QWidget): if self.inline_color_stack: top_color = self.inline_color_stack[-1] if top_color == INLINE_ORANGE: - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) elif top_color == INLINE_BLUE: - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) elif top_color == INLINE_GREEN: - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) elif top_color == INLINE_GRAY: - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) elif top_color == INLINE_RED: - self.ao2text.insertHtml("" + f_character + "") + html = "" + f_character + "" + self.ao2text.insertHtml(html) + self.text.insertHtml(html) else: + self.text.insertHtml(f_character) self.ao2text.insertHtml(f_character) else: if int(self.m_chatmessage[TEXT_COLOR]) == C_RAINBOW: @@ -2899,9 +2921,9 @@ class gui(QtGui.QWidget): self.ypairoffset_l.setVisible("y_offset" in features) self.colordropdown.clear() - self.colordropdown.addItems(['white', 'green', 'red', 'orange', 'blue']) + self.colordropdown.addItems(['White', 'Green', 'Red', 'Orange', 'Blue']) if "yellowtext" in features: - self.colordropdown.addItems(['yellow', 'pink', 'cyan', 'gray', 'rainbow']) + self.colordropdown.addItems(['Yellow', 'Pink', 'Cyan', 'Gray', 'Rainbow', 'Black']) self.colordropdown.setCurrentIndex(self.mychatcolor) for hp in hplist: