Use a ResourceManager to find assets
This commit is contained in:
@ -2,6 +2,7 @@ from typing import List
|
||||
|
||||
from squirrelbattle.menus import Menu, MainMenu
|
||||
from .display import Display
|
||||
from ..resources import ResourceManager
|
||||
|
||||
|
||||
class MenuDisplay(Display):
|
||||
@ -74,7 +75,7 @@ class MainMenuDisplay(Display):
|
||||
super().__init__(*args)
|
||||
self.menu = menu
|
||||
|
||||
with open("squirrelbattle/assets/ascii_art.txt", "r") as file:
|
||||
with open(ResourceManager.get_asset_path("ascii_art.txt"), "r") as file:
|
||||
self.title = file.read().split("\n")
|
||||
|
||||
self.pad = self.newpad(max(self.rows, len(self.title) + 30),
|
||||
|
Reference in New Issue
Block a user