🐛 ModuleNotFoundError in starrailuid_stamina (#39)

* Delete StarRailUID/utils/image.py

* Update image_tools.py

* Update get_help.py

* Rename Help.json to help.json
This commit is contained in:
ishkong 2024-10-05 15:49:42 +08:00 committed by GitHub
parent 67bff8694e
commit fb3cfe6250
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 11 deletions

View File

@ -7,7 +7,7 @@ from msgspec import json as msgjson
from gsuid_core.help.model import PluginHelp
from gsuid_core.help.draw_new_plugin_help import get_new_help
from ..utils.image import get_footer
from ..utils.image.image_tools import get_footer
from ..utils.sr_prefix import PREFIX
from ..version import StarRailUID_version

View File

@ -1,9 +0,0 @@
from pathlib import Path
from PIL import Image
TEXT_PATH = Path(__file__).parent / 'texture2d'
def get_footer():
return Image.open(TEXT_PATH / 'footer.png')

View File

@ -8,6 +8,7 @@ from ..resource.RESOURCE_PATH import CU_BG_PATH
BG_PATH = Path(__file__).parent / "bg"
NM_BG_PATH = BG_PATH / "nm_bg"
TEXT_PATH = Path(__file__).parent / "texture2d"
if list(CU_BG_PATH.iterdir()) != []:
bg_path = CU_BG_PATH
@ -25,3 +26,7 @@ async def get_simple_bg(
) -> Image.Image:
CIL = CustomizeImage(NM_BG_PATH)
return CIL.get_image(image, based_w, based_h)
def get_footer():
return Image.open(TEXT_PATH / 'footer.png')