37 lines
914 B
Python

import pygame
from pygame.locals import *
class Window:
__width:int = 800
__height:int = 600 # takes 80% of width which tranlates to 640
__title:str = "python game engine"
__screen:pygame.Surface
__clock:pygame.time.Clock
def __init__(self, width:int=800, height:int=600, title:str="python game engine"):
self.__width = width
self.__height = height
self.__title = title
self.__screen = pygame.display.set_mode((self.__width, self.__height))
pygame.display.init()
pygame.display.set_caption = self.__title
# set framerate
def Render(self):
pass
def setWidth(self, width:int):
self.__width = width
def setHeight(self, height:int):
self.__height = height
def setTitle(self, title:str):
self.__title = title
def getScreen(self) -> pygame.surface:
return self.__screen