示例#1
0
def render_swipe_icon() -> None:
    PULSE_PERIOD = const(1200000)

    icon = res.load(ui.ICON_SWIPE)
    t = ui.pulse(PULSE_PERIOD)
    c = ui.blend(ui.GREY, ui.DARK_GREY, t)
    ui.display.icon(70, 205, icon, c, ui.BG)
示例#2
0
    def on_render(self) -> None:
        PULSE_PERIOD = const(1200000)

        super().on_render()

        if not self.pageable.is_first():
            t = ui.pulse(PULSE_PERIOD)
            c = ui.blend(ui.GREY, ui.DARK_GREY, t)
            icon = res.load(ui.ICON_SWIPE_RIGHT)
            ui.display.icon(18, 68, icon, c, ui.BG)

        if not self.pageable.is_last():
            t = ui.pulse(PULSE_PERIOD, PULSE_PERIOD // 2)
            c = ui.blend(ui.GREY, ui.DARK_GREY, t)
            icon = res.load(ui.ICON_SWIPE_LEFT)
            ui.display.icon(205, 68, icon, c, ui.BG)
示例#3
0
def render_swipe_icon() -> None:
    DRAW_DELAY = const(200000)

    icon = res.load(ui.ICON_SWIPE)
    t = ui.pulse(DRAW_DELAY)
    c = ui.blend(ui.GREY, ui.DARK_GREY, t)
    ui.display.icon(70, 205, icon, c, ui.BG)
示例#4
0
async def animate_swipe():
    time_delay = const(40000)
    draw_delay = const(200000)

    sleep = loop.sleep(time_delay)
    for t in ui.pulse(draw_delay):
        fg = ui.blend(ui.GREY, ui.DARK_GREY, t)
        ui.display.icon(110, 210, res.load(ui.ICON_SWIPE), fg, ui.BG)
        await sleep
示例#5
0
def render_swipe_icon() -> None:
    if utils.DISABLE_ANIMATION:
        c = ui.GREY
    else:
        PULSE_PERIOD = const(1200000)
        t = ui.pulse(PULSE_PERIOD)
        c = ui.blend(ui.GREY, ui.DARK_GREY, t)

    icon = res.load(ui.ICON_SWIPE)
    ui.display.icon(70, 205, icon, c, ui.BG)
示例#6
0
async def animate_swipe():
    time_delay = const(40000)
    draw_delay = const(200000)

    ui.display.text_center(130, 220, 'Swipe', ui.BOLD, ui.GREY, ui.BG)

    sleep = loop.sleep(time_delay)
    icon = res.load(ui.ICON_SWIPE)
    for t in ui.pulse(draw_delay):
        fg = ui.blend(ui.GREY, ui.DARK_GREY, t)
        ui.display.icon(70, 205, icon, fg, ui.BG)
        yield sleep