예제 #1
0
def splash_screen(canvas):
    def show_main_menu(obj, signal, source):
        fire_hooks('show:main-menu')

    splash = Edje(canvas, file=THEME, group='splash')
    splash.signal_callback_add("show,main-menu", "", show_main_menu)
    splash.show()
예제 #2
0
def main_menu(canvas):
    def on_show():
        menu.signal_emit("show,main-menu", "")

    def quit_game(obj, signal, source):
        main_loop_quit()

    def start_game(obj, signal, source):
        fire_hooks('game:new')

    menu = Edje(canvas, file=THEME, group="main-menu")
    menu.signal_callback_add("game,new",  "", start_game)
    menu.signal_callback_add("game,quit", "", quit_game)
    menu.show()
    
    add_hook('show:main-menu', on_show)