def page_jeux(): touche = pynitel.repetition while True: if touche == pynitel.repetition: pynitel.home() pynitel.xdraw('pages/page_jeux.vdt') (jeux_code,touche) = pynitel.input(14, 19, 4, data='') if touche == pynitel.envoi: if jeux_code == "DES": pynitel.xdraw('pages/page_jeux_des.vdt') (jeux_nb,touche) = pynitel.input(14, 19, 4, data='') (result_des) = modules.jeux_des(nb) if jeux_code == "MOTS" pynitel.xdraw('pages/page_jeux_mots.vdt') (jeux_nb,touche) = pynitel.input(14, 19, 4, data='') (result_mot) = modules.jeux_mots(nb) if touche == pynitel.sommaire: break
def page_mitterrand(): while True: pynitel.home() pynitel.xdraw('pages/mitterrand.vdt') pynitel.bip() (choix,touche) = pynitel.input_key(0, 1, 0, data='') pynitel.cursor(False) if touche == pynitel.sommaire: break
def page_menu(code): touche = pynitel.repetition while True: # affichage initial ou répétition if touche == pynitel.repetition: pynitel.home() pynitel.xdraw('pages/page_acceuil.vdt') (code,touche) = pynitel.input(15, 8, 31, data='') print code if touche != pynitel.repetition: break return (touche, code)
def page_info(): touche = pynitel.repetition while True: pynitel.cursor(False) if touche == pynitel.repetition: pynitel.home() pynitel.xdraw('pages/page_info_0.vdt') (choix,touche) = pynitel.input_key(0, 1, 0, data='') if touche == pynitel.suite: pynitel.home() pynitel.xdraw('pages/page_info_1.vdt') if touche == pynitel.sommaire: break
def page_metar(): touche = pynitel.repetition while True: if touche == pynitel.repetition: pynitel.home() pynitel.xdraw('pages/page_metar.vdt') (oaci_code,touche) = pynitel.input(14, 19, 4, data='') if touche == pynitel.envoi: (metar) = modules.metar(oaci_code) pynitel._del(17,10) pynitel._del(18,0) pynitel.pos(17,10) pynitel._print(metar) if touche == pynitel.sommaire: break
def serveur(): (code) = init() while True: (touche, code) = page_menu(code) if touche == pynitel.envoi: pynitel.cursor(False) pynitel.pos(0,1) pynitel.flash() pynitel._print('Recherche... ') recherche(code,) code = '' if touche == pynitel.guide: page_code() code = '' if touche == pynitel.connexionfin: pynitel.home() pynitel.cursor(False) pynitel.pos(0,1) pynitel._print('Déconnexion') pynitel.end() break