Example #1
0
def tick_wait(ms, d):
    global SKIPWAIT
    ge()
    if SKIPWAIT: return False
    if ms < d:
        time.sleep(0.001 * (d - ms))
        return True
    return False
Example #2
0
def Update_Loading(stage, text, *args):
    global finalstage, loading_img, bar_grad, screen, mytext, myfont, mytext2, lb, lbr
    screen.fill((0, 0, 0))
    screen.blit(loading_img, (0, 0))
    y = 0

    if stage == -1:
        stage = finalstage

    text += " / " + str(int(100 * stage / float(finalstage))) + "%"
    Loading_Bar(stage, text)
    myflip()
    ge()
Example #3
0
def Update_Loading(stage, text, *args):
    global finalstage, loading_img, bar_grad, screen, mytext, myfont, mytext2, lb, lbr
    screen.fill((0,0,0))
    screen.blit(loading_img, (0,0))
    y = 0

    if stage == -1:
        stage = finalstage

    text += " / " + str(int(100*stage/float(finalstage))) + "%"
    Loading_Bar(stage, text)
    myflip()
    ge()
Example #4
0
def r_wait(sec):
    ft = pygame.time.get_ticks()
    while pygame.time.get_ticks() < ft + sec * 1000:
        time.sleep(0.001)
        for e in ge():
            if e.type == KEYDOWN:
                if e.key == K_ESCAPE or e.key == K_RETURN: return True
    return False
Example #5
0
def r_wait(sec):
    ft = pygame.time.get_ticks()
    while pygame.time.get_ticks() < ft + sec*1000:
        time.sleep(0.001)
        for e in ge():
            if e.type == KEYDOWN:
                if e.key == K_ESCAPE or e.key == K_RETURN: return True
    return False