From f3ab2c4223c971a78ac663f26f6ee3352d7d801b Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sat, 5 Mar 2016 21:54:15 +0200 Subject: [PATCH] Make new images safe. --- koperkapel/scenes/menu.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/koperkapel/scenes/menu.py b/koperkapel/scenes/menu.py index b5d7815..956a4b1 100644 --- a/koperkapel/scenes/menu.py +++ b/koperkapel/scenes/menu.py @@ -4,6 +4,7 @@ from pgzero.constants import keys from pgzero.loaders import images from ..actors.navigator import ActorNavigator from ..actors.orientatedsurf import OrientatedSurfActor, SelectableSurfActor +from ..util import safepath from .base import Scene, ChangeSceneEvent, WorldEvent, QuitEvent @@ -19,7 +20,7 @@ class MenuScene(Scene): def _init_bg(self): self.actors.default.clear() self.actors.default.add(OrientatedSurfActor( - images.load("splash/background"))) + images.load(safepath("splash/background")))) def _init_buttons(self): self._nav = ActorNavigator() @@ -39,8 +40,8 @@ class MenuScene(Scene): def _build_button(self, name, action): actor = SelectableSurfActor( - images.load("splash/%s" % (name,)), - images.load("splash/%s_selected" % (name,))) + images.load(safepath("splash/%s" % (name,))), + images.load(safepath("splash/%s_selected" % (name,)))) actor.action = action return actor -- 2.34.1