def notify(title, msg, level=BASIC): from user_settings import UserSettings as us if level <= us.notify_level: _notify(title, msg) if us.sound_notify: from client.ui.soundmgr import SoundManager SoundManager.play('c-sound-input')
def notify(title, msg, level=BASIC): from user_settings import UserSettings as us if level <= us.notify_level: _notify(title, msg) if us.sound_notify: from client.ui.soundmgr import SoundManager SoundManager.play("c-sound-input")
def process_user_input(self, ilet): meta = ilet.character.ui_meta self.texture = L(meta.port_image) Label( text=meta.name, x=2, y=80, font_size=12, anchor_x='left', anchor_y='bottom', color=(255, 255, 160, 255), shadow=(2, 0, 0, 0, 230), batch=self.lbls, ) ta = TextArea( parent=self, font_size=9, x=0, y=0, width=self.width, height=80 - 2, ) ta.append(ilet.dialog) def on_mouse_press(*a, **k): ilet.set_result(0) ilet.done() end_transaction(self.trans) self.event(on_mouse_press) ta.event(on_mouse_press) self.should_draw = True if ilet.voice: self.player = SoundManager.play(ilet.voice) b = SmallProgressBar(parent=self, x=self.width - 140, y=0, width=140) b.value = LinearInterp(1.0, 0.0, ilet.timeout)
def on_text(self, text): # The easter egg ks = self.keystrokes ks = (ks + text)[:40] self.keystrokes = ks from gamepack.thb.characters.baseclasses import Character for c in Character.character_classes.itervalues(): try: alter = c.ui_meta.figure_image_alter except: continue for i in xrange(len(ks)): if L(alter).decrypt(ks[-i:]): SoundManager.play('c-sound-input')
def on_text(self, text): # The easter egg ks = self.keystrokes ks = (ks + text)[:40] self.keystrokes = ks from gamepack.thb.characters import characters as chars for c in chars: try: alter = c.ui_meta.figure_image_alter except: continue for i in xrange(len(ks)): if alter.decrypt(ks[-i:]): SoundManager.play(cres.sound.input)
def on_text(self, text): # The easter egg ks = self.keystrokes ks = (ks + text)[:40] self.keystrokes = ks from thb.characters.baseclasses import Character for c in Character.character_classes.itervalues(): try: alter = c.ui_meta.figure_image_alter except: continue for i in xrange(len(ks)): if L(alter).decrypt(ks[-i:]): SoundManager.play('c-sound-input')