Exemplo n.º 1
0
    def __init__(self, parent_world, theme_dir, theme_cfg_file, debug=0):
        self.debug = debug
        self.theme_dir = theme_dir
        self.parent_world = parent_world

        self.theme_file = ThemeFile(self.debug)
        path = os.path.join(self.theme_dir, theme_cfg_file)
        self.theme_file.store_theme(path)

        self.items = {}

        self.fonts = {}
        self.fonts['p'] = {}
        self.fonts['h1'] = {}
        self.fonts['lyrics'] = {}
        self.fonts['button'] = {}

        self.box = {}
        self.box['border'] = {}
        self.box['background'] = {}

        self.bar = self.theme_file.bar

        self.world = soya.World()

        self.create_fonts()
        self.box = self.theme_file.box
        self.button = self.theme_file.button

        self.create_atmosphere()
        self.create_models()
        self.create_animodels()
        self.create_panels()

        self.world.atmosphere = self.items['atmosphere']