def delay(self, secs, allow_skip):
    if (not self.use_status_line):
        time.sleep(secs)
        return
    if self.show_toggle:
        togglelabel = (lambda : ('<r>切换自动补充理智(%s)' % ('ON' if self.helper.use_refill else 'OFF')))

        def togglecallback(handler):
            self.helper.use_refill = (not self.helper.use_refill)
            handler.label = togglelabel()
        togglehandler = (lambda : fancywait.KeyHandler(togglelabel(), b'r', togglecallback))
    else:
        togglehandler = (lambda : fancywait.KeyHandler(None, None, None))
    skiphandler = fancywait.KeyHandler('<ENTER>跳过', b'\r', skipcallback)
    skipdummy = fancywait.KeyHandler('           ', b'', (lambda x: None))
    fancywait.fancy_delay(secs, self.statusline, [(skiphandler if allow_skip else skipdummy), togglehandler()])
def delay(self, secs, allow_skip):
    if (not self.use_status_line):
        time.sleep(secs)
        return
    if self.show_toggle:
        togglelabel = (lambda : ('<r>切换自动补充理智(%s)' % ('ON' if self.helper.use_refill else 'OFF')))

        def togglecallback(handler):
            self.helper.use_refill = (not self.helper.use_refill)
            handler.label = togglelabel()
        togglehandler = (lambda : fancywait.KeyHandler(togglelabel(), b'r', togglecallback))
    else:
        togglehandler = (lambda : fancywait.KeyHandler(None, None, None))
    skiphandler = fancywait.KeyHandler('<ENTER>跳过', b'\r', skipcallback)
    skipdummy = fancywait.KeyHandler('           ', b, (lambda x: None))
    fancywait.fancy_delay(secs, self.statusline, [(skiphandler if allow_skip else skipdummy), togglehandler()])