BigSteve/PyGame/dieproj/dice_in_window.py

34 lines
523 B
Python

import random
import pygame
import pygame_gui
import sys
pygame.init()
pygame.display.set_caption('Dice Roll')
window_surface = pygame.display.set_mode((800, 600))
background = pygame.Surface((800, 600))
background.fill(pygame.Color('#009900'))
manager = pygame_gui.UIManager((800, 600))
is_running = True
while is_running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
is_running = False
window_surface.blit(background, (0, 0))
pygame.display.update()