I've got a problem. I'm creating the Game Menu which i want to be:
- background as video file (using MoviePy)
- buttons on the video
The problem is video is showing, but the button1 not. Please help...
from moviepy.editor import *
import pygame
from pygame import mixer
import os
import cv2
print(os.getcwd())
# Initialization the PyGame
pygame.init()
# Create the screen
WIN = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)
# Menu Background
background = pygame.image.load('Assets/background.png')
button1 = pygame.image.load('Assets/button.png')
# Background SOUND
mixer.music.load('Assets/mainmenumusic.mp3')
mixer.music.set_volume(0.2)
mixer.music.play(-1)
# Game TITLE and ICON
pygame.display.set_caption("Game Launcher") # title of the game
icon = pygame.image.load('Assets/icon.png') # define the icon variable
pygame.display.set_icon(icon) # set the window icon to the icon variable
# FPS Lock
FPS = 60
clip = VideoFileClip('Assets/particles.mp4', audio=False)
# Game loop
clock = pygame.time.Clock()
running = True
while running:
clock.tick(FPS)
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
WIN.blit(button1, (960, 540))
clip.preview(fullscreen=True)
pygame.display.update()