#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: K_liu
import pygame
from pygame.locals import *
from sys import exit
pygame.init()
# Configuration file
window_size = (1280, 750)
screen = pygame.display.set_mode(window_size, 0, 32)
pygame.display.set_caption('Message Box Test')
def LoginPage():
message_box = [] # Create a message box
back_image = pygame.image.load('logo2.jpg').convert()
while True:
break_switch = False
for event in pygame.event.get():
if event.type == QUIT:
exit()
screen.fill((255, 255, 255)) # background color
screen.blit(back_image, (400, 100))
# message box .....................................................................
screen.set_clip(470, 300, 300, 50) # message box's location
screen.fill((47, 79, 79)) # message box's color
x, y = pygame.mouse.get_pos()
if 500 < x < 800
Pygame 实现文本输入
最新推荐文章于 2025-05-24 09:04:18 发布