def __init__(self):
     YamlParser = ruamel.yaml.YAML()
     ConfigPath = GlobalFunctions.Find("Config.yaml", "../")
     Config = open(ConfigPath, "r")
     self.Config = YamlParser.load(Config)
     self.Config = self.Config["Config"]["Start Menu"]
     self.Resolution = (self.Config["Aspect Ratio"][0] *
                        self.Config["Scale"],
                        self.Config["Aspect Ratio"][1] *
                        self.Config["Scale"])
     if self.Config["FullScreen"]:
         self.FullScreen = FULLSCREEN
Esempio n. 2
0
 def __init__(self):
     YamlParser = ruamel.yaml.YAML()
     ConfigPath = GlobalFunctions.Find("Config.yaml", "../")
     Config = open(ConfigPath, "r")
     self.Config = YamlParser.load(Config)
     self.Config = self.Config["Config"]["Main Menu"]
Esempio n. 3
0
#This is the main script which is the control loop that the program follows
import StartScreen, pygame, ruamel.yaml, GlobalFunctions, MenuScreen, time, os, subprocess
from pygame.locals import *
from Colours.BasicColours import *

pygame.init()

_StartScreen_ = StartScreen.StartScreenInit()
Resolution = _StartScreen_.Resolution
Screen = pygame.display.set_mode(Resolution, _StartScreen_.FullScreen)

YamlParser = ruamel.yaml.YAML()
ConfigPath = GlobalFunctions.Find("Config.yaml", "/.")
Config = open(ConfigPath, "r")
Config = YamlParser.load(Config)

_StartScreenText_ = StartScreen.Start()
TextSize = _StartScreenText_.PixelFont.size("Press Any Key To Continue")
ImageSize = _StartScreenText_.LogoImage.get_size()

#Menu Class
MainMenu = MenuScreen.MenuScreenInit()
_MainMenu_ = MenuScreen.Menu()
AllGames = _MainMenu_.ListGames()

#BigTextHeight
BigTextHeight = _MainMenu_.GetTextSize(AllGames)[1]

#For Main Menu
Selector = 0
SelectorPos = [0, 0]