Exemple #1
0
def update():
    canvas.fill((0,0,0,0))
    canvas.blit(gui.res.contents_panel, (0, 0))
    # カーソル描画
    global alpha, dalpha, blink_count
    if active:
        cursor.set_alpha(alpha)
        canvas.blit(cursor, (0, selected * cursor.get_height()))
    # コンテンツ描画
    canvas.blit(back, (0, 0))
    #self.canvas.blit(self.check_update, (0, main.smallfont.get_height()))
    #self.canvas.blit(self.show_demo, (0, main.smallfont.get_height() * 2))

    # 上下矢印描画
    if active and blink_count > 15:
        if is_able_to_go_up():
            canvas.blit(wbui.up_arrow, pygamehelper.center_to_lefttop(wbui.up_arrow, (canvas.get_width() / 2, selected * cursor.get_height()) ))
        if is_able_to_go_down():
            canvas.blit(wbui.down_arrow, pygamehelper.center_to_lefttop(wbui.down_arrow, (canvas.get_width() / 2, (selected + 1) * cursor.get_height() - 1)))

    # カーソル点滅
    alpha += dalpha
    if alpha > 127:
        alpha = 127
        dalpha *= -1
    elif alpha < 50:
        alpha = 50
        dalpha *= -1

    # 上下矢印点滅
    blink_count += 1
    if blink_count >= 30:
        blink_count = 0
Exemple #2
0
def update():
    canvas.fill((0, 0, 0, 0))
    canvas.blit(gui.res.contents_panel, (0, 0))

    global alpha, dalpha, blink_count
    # カーソル描画
    if active:
        alpha = gui.util.get_cycling_value_by_time((16, 128), 2000)
        cursor.set_alpha(alpha)
        canvas.blit(cursor, (0, selected * cursor.get_height()))

    # 新規作成
    canvas.blit(create_new, (0, 0))

    # VG一覧
    i = 0
    for vg in vglist:
        draw_item(i + 1, vg["name"], vg["size"], vg["free"])
        i += 1

    # カーソルの上下矢印描画
    if active and gui.util.get_cycling_bool_by_time(1500):
        if is_able_to_go_up():
            canvas.blit(
                wbui.up_arrow,
                pygamehelper.center_to_lefttop(
                    wbui.up_arrow,
                    (canvas.get_width() / 2, selected * cursor.get_height())))
        if is_able_to_go_down():
            canvas.blit(
                wbui.down_arrow,
                pygamehelper.center_to_lefttop(
                    wbui.down_arrow,
                    (canvas.get_width() / 2,
                     (selected + 1) * cursor.get_height() - 1)))

    alpha += dalpha
    if alpha > 127:
        alpha = 127
        dalpha *= -1
    elif alpha < 50:
        alpha = 50
        dalpha *= -1

    blink_count += 1
    if blink_count >= 30: blink_count = 0
Exemple #3
0
def update():
    canvas.fill((0, 0, 0, 0))
    canvas.blit(gui.res.contents_panel, (0, 0))
    # カーソル描画
    global alpha, dalpha, blink_count
    if active:
        cursor.set_alpha(alpha)
        canvas.blit(cursor, (0, selected * cursor.get_height()))
    # コンテンツ描画
    canvas.blit(back, (0, 0))
    #self.canvas.blit(self.check_update, (0, main.smallfont.get_height()))
    #self.canvas.blit(self.show_demo, (0, main.smallfont.get_height() * 2))

    # 上下矢印描画
    if active and blink_count > 15:
        if is_able_to_go_up():
            canvas.blit(
                wbui.up_arrow,
                pygamehelper.center_to_lefttop(
                    wbui.up_arrow,
                    (canvas.get_width() / 2, selected * cursor.get_height())))
        if is_able_to_go_down():
            canvas.blit(
                wbui.down_arrow,
                pygamehelper.center_to_lefttop(
                    wbui.down_arrow,
                    (canvas.get_width() / 2,
                     (selected + 1) * cursor.get_height() - 1)))

    # カーソル点滅
    alpha += dalpha
    if alpha > 127:
        alpha = 127
        dalpha *= -1
    elif alpha < 50:
        alpha = 50
        dalpha *= -1

    # 上下矢印点滅
    blink_count += 1
    if blink_count >= 30:
        blink_count = 0
Exemple #4
0
def update():
    canvas.fill((0,0,0,0))
    canvas.blit(gui.res.contents_panel, (0, 0))

    global alpha, dalpha, blink_count
    # カーソル描画
    if active:
        alpha = gui.util.get_cycling_value_by_time((16,128), 2000)
        cursor.set_alpha(alpha)
        canvas.blit(cursor, (0, selected * cursor.get_height()))

    # 新規作成
    canvas.blit(create_new, (0, 0))

    # VG一覧
    i = 0
    for vg in vglist:
        draw_item(i + 1, vg["name"], vg["size"], vg["free"])
        i += 1

    # カーソルの上下矢印描画
    if active and gui.util.get_cycling_bool_by_time(1500):
        if is_able_to_go_up():
            canvas.blit(wbui.up_arrow, pygamehelper.center_to_lefttop(wbui.up_arrow, (canvas.get_width() / 2, selected * cursor.get_height()) ))
        if is_able_to_go_down():
            canvas.blit(wbui.down_arrow, pygamehelper.center_to_lefttop(wbui.down_arrow, (canvas.get_width() / 2, (selected + 1) * cursor.get_height() - 1) ))

    
    alpha += dalpha
    if alpha > 127:
        alpha = 127
        dalpha *= -1
    elif alpha < 50:
        alpha = 50
        dalpha *= -1

    blink_count += 1
    if blink_count >= 30: blink_count = 0