作者xnike2002 (BB)
看板GameDesign
标题[程式] 有人能告诉我怎麽写嘛???
时间Tue May 5 20:54:29 2009
现在滑鼠随便乱点的话 dos那边都会显示123+456,而我现在是需要滑鼠点档名
11的那张图後dos可以显示123+456 点另一张就不会
我不知道怎麽写...有人可以帮我解答嘛?
谢谢
import pygame
from pygame.locals import *
background_image_filename = '1.jpg'
background1_image_filename = '11.jpg'
pygame.init ()
screen = pygame.display.set_mode ((800, 600))
pygame.display.set_caption('1947')
background = pygame.image.load(background_image_filename).convert()
background1 = pygame.image.load(background1_image_filename).convert()
while True:
for event in pygame.event.get():
if event.type == QUIT:
exit()
if event.type == MOUSEBUTTONDOWN:
print '123+456'
screen.blit(background, (0,0))
screen.blit(background1, (350,350))
pygame.display.update()
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.40.23.28
1F:→ justben:(不懂乱入) pygame 跟 background 有关系吗? 05/05 21:41
2F:→ xnike2002:我也不知道.....所以才想知道哪里错误 05/05 21:43