def prepare(self): pygame.init() self.window = pygame.display.set_mode(self.args.real_size) self.screen = pygame.Surface(self.args.size) self.event = e.Event(self.args) self.ui = u.UI(self.window, self.screen) pygame.display.set_caption('Cut & Slice') pygame.display.set_icon(self.ui.image.get('icon.png')) self.clock = pygame.time.Clock()
def prepare(self): pygame.init() self.window = pygame.display.set_mode(self.args.real_size) self.screen = pygame.Surface(self.args.size) self.event = e.Event(self.args) self.ui = u.UI(self.window, self.screen) pygame.display.set_caption('Platformer') try: pygame.display.set_icon(self.ui.image.get('icon.png')) except: print(f'ERROR: cannot load src\\imgs\\icon.png!') self.clock = pygame.time.Clock()
def prepare(self): pygame.init() self.window = pygame.display.set_mode(self.args.real_size) self.screen = pygame.Surface(self.args.size, flags=pygame.DOUBLEBUF) self.screen.set_alpha(None) self.event = e.Event(self.args) self.ui = u.UI(self.args, self.window, self.screen) pygame.display.set_caption('Py-Generals') try: pygame.display.set_icon(self.ui.image.get('icon.png')) except: print(f'ERROR: cannot load src\\imgs\\icon.png!') self.clock = pygame.time.Clock()