예제 #1
0
파일: pygamecore.py 프로젝트: aquach/volt
def choiceBox(message, choices):
    """Wrapper choice dialog generator. Returns the index of the chosen
    value."""
    c = pygame.ChoiceBoxDef()
    c.text = message
    c.choices = pygame.StringVector(choices)
    choice = disown(pygame.ChoiceBox(c))
    pygame.scene().ShowDialogBox(choice)
    return choice.WaitForChoice()
예제 #2
0
파일: pygamecore.py 프로젝트: aquach/volt
def messageBox(message, wait=False, modal=True, canSkip=True,
               pauseDuration=1.0):
    """Wrapper message box generator."""
    b = pygame.MessageBoxDef()
    b.text = message
    b.pauseDuration = pauseDuration
    b.modal = modal
    b.canSkip = canSkip
    
    box = disown(pygame.MessageBox(b))
    pygame.scene().ShowDialogBox(box)
    if wait:
        box.WaitForFinish()