Mercurial > touhou
comparison pytouhou/ui/sdl/backend.pyx @ 553:8f51e34d911c
Refactor graphics backend selection, to make them fallbackable and optional.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 29 May 2014 12:31:55 +0200 |
parents | |
children | 0768122da817 |
comparison
equal
deleted
inserted
replaced
552:aad758aef26d | 553:8f51e34d911c |
---|---|
1 from pytouhou.lib cimport sdl | |
2 from pytouhou.lib.sdl cimport Window | |
3 | |
4 | |
5 GameRenderer = None | |
6 | |
7 | |
8 def init(_): | |
9 global GameRenderer | |
10 from pytouhou.ui.sdl.gamerenderer import GameRenderer | |
11 | |
12 | |
13 def create_window(title, x, y, width, height): | |
14 window = Window(title, x, y, width, height, sdl.WINDOW_SHOWN) | |
15 window.create_renderer(0) | |
16 return window |