summaryrefslogtreecommitdiff
path: root/test-cli/test/helpers/sdl.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/helpers/sdl.py')
-rw-r--r--test-cli/test/helpers/sdl.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/test-cli/test/helpers/sdl.py b/test-cli/test/helpers/sdl.py
index 8f55d9f..2abb6ee 100644
--- a/test-cli/test/helpers/sdl.py
+++ b/test-cli/test/helpers/sdl.py
@@ -22,10 +22,10 @@ class SDL2(object):
__renderer = None
__srender = None
- def __init__(self, parent):
+ def __init__(self):
os.environ['SDL_VIDEODRIVER'] = "x11"
os.environ['DISPLAY'] = ":0"
- self.__resources = sdl2.ext.Resources(parent.getAppPath(), 'files')
+ # self.__resources = sdl2.ext.Resources(parent.getAppPath(), 'files')
sdl2.ext.init()
self.__createWindow()
@@ -39,8 +39,8 @@ class SDL2(object):
self.__window.show()
SDL_ShowCursor(SDL_DISABLE)
- def createFont(self, fontName, fontSize, fontColor):
- return sdl2.ext.FontManager(font_path=self.__resources.get_path(fontName), size=fontSize, color=fontColor)
+ # def createFont(self, fontName, fontSize, fontColor):
+ # return sdl2.ext.FontManager(font_path=self.__resources.get_path(fontName), size=fontSize, color=fontColor)
def WriteText(self, text, x, y, fontManager):
imText = self.__factory.from_text(text, fontmanager=fontManager)
@@ -69,16 +69,16 @@ class SDL2(object):
def update(self):
self.__renderer.present()
- def showImage(self, filename):
- im = self.__factory.from_image(self.__resources.get_path(filename))
- self.__srender.render(im)
+ # def showImage(self, filename):
+ # im = self.__factory.from_image(self.__resources.get_path(filename))
+ # self.__srender.render(im)
class SDL2_Test(object):
__sdl2 = None
- def __init__(self, parent):
- self.__sdl2 = SDL2(parent)
+ def __init__(self):
+ self.__sdl2 = SDL2()
def Clear(self):
self.__sdl2.fillbgColor('black', True)
@@ -93,8 +93,8 @@ class SDL2_Message(object):
__fontManager_w = None
__fontManager_b = None
- def __init__(self, parent):
- self.__sdl2 = SDL2(parent)
+ def __init__(self):
+ self.__sdl2 = SDL2()
self.__fontManager_w = self.__sdl2.createFont('OpenSans-Regular.ttf', 24, Colors['white'])
self.__fontManager_b = self.__sdl2.createFont('OpenSans-Regular.ttf', 24, Colors['black'])