美文网首页
pygame 界面制作

pygame 界面制作

作者: 学python的铁头娃 | 来源:发表于2018-11-24 16:12 被阅读0次

author=REI

date:2018/11/24

import pygame
pygame.init()
from color import Color
window =pygame.display.set_mode((800,600))
window.fill((255, 255, 255))
import math

image_obj=pygame.image.load('timg.jpg')
window.blit(image_obj, (0, 0))

image1=pygame.image.load('123.jpg')
image1 = pygame.transform.rotozoom(image1, 0, 0.2)
window.blit(image1, (30, 30))

pygame.draw.rect(window, Color.white,(450,200,250,50),0)
pygame.draw.rect(window,Color.blue,(260,490,250,50),0)
pygame.draw.rect(window,Color.white,(450,350,250,50),0)
font1=pygame.font.Font('aa.ttf',35)
text = font1.render('欢迎来到千峰管理系统!', True, (0, 255, 204))
window.blit(text, (215, 50))
text = font1.render('账号:', True, (0, 34, 119))
window.blit(text, (450, 200))
text = font1.render('登录', True, (0, 238,221))
window.blit(text,(350,490))
text = font1.render('密码:', True, (0, 34,119))
window.blit(text, (450, 350))
pygame.display.flip()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()

相关文章

网友评论

      本文标题:pygame 界面制作

      本文链接:https://www.haomeiwen.com/subject/pilyqqtx.html