用户:
善良的大黄鸡dViZ查看:0 回复:0 评论:0 创建时间:2021-02-06T10:33:36
【作品展示】

【作品介绍】
从v
【作品源代码】
from moviepy.editor import *
import pygame
from pygame.locals import *
import time
import random
import sys
import os
import easygui as easy
from moviepy.video.fx.resize import resize
import pygame
pygame.init()
#将窗口固定在(0,25)的位置
os.environ[ 'SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (0, 25)
#创建一个长宽分别为1000/600窗口
canvas = pygame.display.set_mode((1000,600))
#填充窗口颜色为白色
canvas.fill((255,255,255))
#设置窗口标题
pygame.display.set_caption("中药宝")
pygame.display.set_caption('Hello World!')
pygame.display.set_mode((1050,660))
clip = VideoFileClip('images/mov.mp4')
clip.fx(resize,width=240)
clip.preview()
pygame.quit()
while True:
path = "images/bg.png"
#一级界面背景
bg = pygame.image.load(path)
canvas.blit(bg,(0,0))
for event in pygame.event.get():
if event.type == pygame.QUIT:
exit()
# 判断鼠标是否按下
if event.type == pygame.MOUSEBUTTONDOWN:
#判断是否是鼠标左键被按下
if event.button == 1:
#获取鼠标坐标位置
pos = pygame.mouse.get_pos()
mouseX = pos[0]
mouseY = pos[1]
#判断设定好的点击区域
if 860 <= mouseX <= 1035 and 480 <= mouseY <= 650:
# 退出当前界面窗口
pygame.quit()
# 实现跳转二级页面功能
os.system('python index.py')
exit()
for event in pygame.event.get():
if event.type == QUIT or event.type ==KEYDOWN and event.key ==K_ESCAPE:
pygame.quit()
pygame.display.update()
exit()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn