X-Git-Url: https://scm.cri.ensmp.fr/git/minwii.git/blobdiff_plain/e7854ed82aa375273bfbf772493739f875817061..46f3ffd7fdde386f41020171b5733e55a8e64a85:/src/minwii/widgets/launch.py?ds=inline diff --git a/src/minwii/widgets/launch.py b/src/minwii/widgets/launch.py new file mode 100755 index 0000000..04f1cbd --- /dev/null +++ b/src/minwii/widgets/launch.py @@ -0,0 +1,19 @@ +import pygame +import os.path + +class LaunchScreen : + + @staticmethod + def _get_launch_image() : + imagePath = os.path.abspath(__file__).split(os.path.sep)[:-1] + imagePath.extend(['data', 'accueil.png']) + return os.path.sep.join(imagePath) + + def __init__(self) : + imagePath = LaunchScreen._get_launch_image() + self.image = pygame.image.load(imagePath) + size = self.image.get_size() + pygame.display.set_mode(size, pygame.NOFRAME) + screen = pygame.display.get_surface() + screen.blit(self.image, (0,0)) + pygame.display.flip()