Example #1
0
    pygame.display.update()
    pygame.time.delay(3000)
    stop0 = False
    while not stop0:
        screen.fill(color1)
        textbox6.draw(screen)
        events0 = pygame.event.get()
        for event in events0:
            if event.type == pygame.KEYDOWN:
                if event.key == pygame.K_RETURN:
                    address = textbox6.value
                    stop0 = True
        textbox6.update(events0)
        pygame.display.update()
    #Get GPS
    geocodex,geocodey=GPS.getgeo(address)
    geocode = str([geocodex,geocodey])

else:
    screen.fill(color1)
    textbox3.draw(screen)
    textbox5.draw(screen)
    pygame.display.update()
    pygame.time.delay(3000)
    address = 'Pulchowk, Lalitpur'
    geocode = str([27.68284,85.32331])
#GPS data
text1 = font.render(address, 1, white)
textpos1 = text1.get_rect()
textpos1.centerx = 325
textpos1.centery = 10