import pygame from config import cfg from emu import emu from gui import gui class application: def __init__(self): print(cfg["Engine"]) self.gfx = gfx_pygame.gfx_pygame() self.gfx.setIcon("arcade.png") if cfg["FullScreen"]: self.screen = self.gfx.dispSetMode(cfg["ResolutionX"], cfg["ResolutionY"], True) else: self.screen = self.gfx.dispSetMode(cfg["ResolutionX"], cfg["ResolutionY"], False) self.font = self.gfx.getFont(cfg["Font"], cfg["FontSize"]) self.status = self.gfx.getSurface(cfg["ResolutionX"], cfg["FontSize"]) self.listwidth = int(cfg["ResolutionX"] / 2) self.emu = emu() self.gui = gui(self.gfx, self.screen, self.font) self.gui.add_menu( 0, 0, self.listwidth, cfg["ResolutionY"] - self.font.get_height(), border=False, # data=self.roms, data=["1", "2"], fg=(255, 255, 255), bg=(0, 0, 0), name="MainList", # startitem=get_emu('CurrentGame'), # itemattop=get_emu('GameAtTop')) startitem=0, itemattop=0, ) self.gui.render() def run(self): pass while True: self.gui.render() self.gfx.tick(60)