Page 309 - 3-2
P. 309

exit()
                    if(860 < x < 960) and (175 < y < 225): initial(1)        # ㄱ
                    elif(860 < x < 960) and (240 < y < 290):    initial(2)  # ㄴ ~ㄷ
                    elif(860 < x < 960) and (305 < y < 355):    initial(3)  # ㅁ ~ㅂ
                    elif(860 < x < 960) and (370 < y < 420):    initial(4)  # ㅅ
                    elif(860 < x < 960) and (435 < y < 485):    initial(5)  # ㅇ
                    elif(860 < x < 960) and (500 < y < 550):    initial(6)  # ㅈ ~ㅎ


            def initial(num):
                global x,y
                x = 0
                y = 0
                if(num is 1) :
                    screen.blit(b1, (0, 0))
                    pygame.display.flip()
                while True :
                    exit()
                    for event in pygame.event.get():
                        #  마우스 이벤트 처리
                        if event.type == MOUSEBUTTONDOWN and event.button == LEFT:
                            x, y = pygame.mouse.get_pos()


                        if(num is 1):   # b1
                                screen.blit(b1, (0, 0))
                                pygame.display.flip()
                                if (860 < x < 1010) and (15 < y < 65): speak() #     음성인식 버튼
                                elif(860 < x < 960) and (175 < y < 550):    search(x,y)  #  수동 버튼
                                else:  output_b1(x,y)
                        elif(num is 2):   # b2
                                screen.blit(b2, (0, 0))
                                pygame.display.flip()
                                if (860 < x < 1010) and (15 < y < 65): speak() #     음성인식 버튼
                                elif (860 < x < 960) and (175 < y < 550): search(x, y)    #  수동 버튼)
                                else:  output_b2(x,y)
                        elif(num is 3):   # b3
                                screen.blit(b3, (0, 0))
                                pygame.display.flip()
                                if (860 < x < 1010) and (15 < y < 65): speak() #     음성인식 버튼
                                elif (860 < x < 960) and (175 < y < 550): search(x, y)    #  수동 버튼
                                else:  output_b3(x,y)
                        elif(num is 4):   # b4
                                screen.blit(b4, (0, 0))
                                pygame.display.flip()
                                if (860 < x < 1010) and (15 < y < 65): speak() #     음성인식 버튼
                                elif (860 < x < 960) and (175 < y < 550): search(x, y)    #  수동 버튼


                                                         - 309 -
   304   305   306   307   308   309   310   311   312   313   314