Ejemplo n.º 1
0
	def load_pictures(pictures, info, results):
		""" Loads the pictures.

		This method loads the pictures using the picture manager.

		Args:
			pictures: The list of picture file names to load.
			info: The showed list of information.
			results: The list of result elements.
		"""
		info.append("Start loading pictures")
		manager = PictureManager()
		for name in pictures:
			info.append(LoadingWindow.INDENT + "Start loading " + \
						name["value"])
			results.append(manager.load_picture(name["value"]))
Ejemplo n.º 2
0
from resources.pictures.picture_manager import PictureManager
from resources.settings.settings_manager import SettingsManager
from resources.resource_manager import ResourceWrapper

import pygame

pygame.init()
screen = pygame.display.set_mode((500, 500))

manager = PictureManager()
wrapper = manager.load_picture("background.png")

while wrapper.status == ResourceWrapper.PENDING:
	pass

print(wrapper.status)

manager = SettingsManager()
wrapper = manager.load_setting("graphics.json")

while wrapper.status == ResourceWrapper.PENDING:
	pass

print(wrapper.status)
print(wrapper.data["width"])
print(manager._settings["graphics.json"]["height"])