Exemplo n.º 1
0
#Dialogs.py
#imports
from AGK.misc import dialog
from AGK.mainframe import window

#main
w = window.window("dialog example")
w.show()
dialog.dialog("This is some text.", type=2)
dlg = dialog.EntryDialog("Enter something.")
dialog.dialog("You entered " + dlg.string)
Exemplo n.º 2
0
import time
from AGK.misc import menu
from AGK.mainframe import window, keyboard
from AGK.speech import auto


def mainmenu():
    m = menu.menu(select_sound="snd/Menu_Select.ogg",
                  move_sound="snd/Menu_Click.ogg",
                  disabled_text="This option is disabled.")
    m.add_item_tts("Start game", "start")
    m.add_item_tts("Exit game", "exit", enabled=False)
    obj = m.run("Main menu")
    if obj.name == "start":
        auto.speak("You selected start.")
        time.sleep(2)
        mainmenu()


w = window.window("game")
w.show()
mainmenu()
Exemplo n.º 3
0
#import
import pygame
from AGK.speech import auto
from AGK.mainframe import window, keyboard
#create a window.
w = window.window("test window")
w.show()
while 1:
    #a test of key holder

    if keyboard.down(pygame.K_a):
        auto.speak("a")

    if keyboard.pressed() == pygame.K_ESCAPE:
        break