[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Moving a ….sprite…item?



Ok so im writing this game and i want to have a menu where you can select one of the items with the arrow keys. This should be simple but i cant figure it out and its driving me insane. By the way the background and arrow that i need are attached at bottom. Thank you all and any  help is greatly apprectiated. I know here it appears i havent tried but trust me i have. I deleted most of the code in frustratian and googled to no avail. Good luck,
Zack

Heres some code

import pygame 

pygame.init()
import sys,random,os
from pygame.locals import*


clock=pygame.time.Clock()
clock.tick(20)

def main_menu():
    menuscreen=pygame.display.set_mode((640, 480))#FULLSCREEN
    pygame.display.set_caption('Dog Fight')
    #pygame.mouse.set_visible(False)

    WHITE=(255,255,255)
    BLACK=(0,0,0)
    GREEN=(0,255,0)
    BLUE=(0,0,255)
    background="" style="color: #2934d5">'data/background.png')
    #lasersound=pygame.mixer.Sound('data/lasershot.wav')

    


    menuexit=False

    while menuexit==False:
        menuscreen.blit(background,(0,0))

#AHHHHHHHH!!!!!!

        for event in pygame.event.get():
            if event.type==QUIT:
                pygame.quit()
                sys.exit()
        pygame.display.update()


main_menu()


   <----Theres the arrow i want blitted next to the menu and then return a 1 2 3 o4 4 depending on what its clicked on




Thats the menu