clean up textures

This commit is contained in:
shenjack 2023-07-16 00:21:31 +08:00
parent d57da4c7ff
commit f3c2540dae
Signed by: shenjack
GPG Key ID: 7B1134A979775551
4 changed files with 5 additions and 5 deletions

View File

@ -250,7 +250,7 @@ class ClientWindow(Window):
self.count = 0
def setup(self):
self.set_icon(pyglet.image.load('./textures/icon.png'))
self.set_icon(pyglet.image.load('assets/textures/icon.png'))
self.load_fonts()
self.screen_list['DR_debug'] = DRDEBUGScreen(self)
self.game.dispatch_mod_event('on_client_start', game=self.game, client=self)
@ -262,7 +262,7 @@ class ClientWindow(Window):
pyglet_load_fonts_folder(fonts_folder_path)
def start_game(self) -> None:
self.set_icon(pyglet.image.load('./textures/icon.png'))
self.set_icon(pyglet.image.load('assets/textures/icon.png'))
try:
pyglet.app.event_loop.run(1 / self.main_config['runtime']['fps'])
except KeyboardInterrupt:

View File

@ -19,5 +19,5 @@ pyglet 坐标轴原点是左上角 0, 0
我check一下微调器的代码原理应该一样有个函数我看看怎么实现
# 素材提供
[背景候选1号](../../textures/runtime/background.png)
[背景候选1号](../../assets/textures/runtime/background.png)
来自 @底层萌新 QQ1744251171

View File

@ -37,7 +37,7 @@ class SR1Textures(Options):
super().__init__(**kwargs)
self.flush_option()
for image_name in self.cached_options:
img = load(f'textures/parts/{image_name}.png')
img = load(f'assets/textures/parts/{image_name}.png')
img.anchor_x = img.width // 2
img.anchor_y = img.height // 2
setattr(self, image_name, img)

View File

@ -127,7 +127,7 @@ if __name__ == '__main__':
file_path = os.path.join(path, file)
dist_dir_size += os.path.getsize(file_path)
# 排除不需要记录的文件
if any(x in file_path for x in ('config', 'libs', 'textures')):
if any(x in file_path for x in ('config', 'libs', 'assets')):
continue
dist_file_size[file_path] = (os.path.getsize(file_path), os.path.getsize(file_path) / 1024 / 1024)
compile_data = {'compile_time_ns': time.time_ns() - start_time,