修改工作图片读取方式

This commit is contained in:
ZouJin 2024-03-21 23:40:37 +08:00
parent ec621e1117
commit d556052cee
12 changed files with 18 additions and 2 deletions

View File

@ -26,7 +26,7 @@ public partial class winWorkMenu : Window
List<Work> ws;
List<Work> ss;
List<Work> ps;
public void ShowImageDefault(Work.WorkType type) => WorkViewImage.Source = mw.ImageSources.FindImage(mw.Set.PetGraph + "_" + type.ToString(), "work");
public void ShowImageDefault(Work.WorkType type) => WorkViewImage.Source = mw.ImageSources.FindImage("work_" + mw.Set.PetGraph + "_t_" + type.ToString(), "work_" + type.ToString());
public winWorkMenu(MainWindow mw, Work.WorkType type)
{
InitializeComponent();
@ -96,7 +96,7 @@ public partial class winWorkMenu : Window
nowworkdisplay = work;
lName.Content = work.NameTrans;
//显示图像
string source = mw.ImageSources.FindSource("work_" + work.Graph) ?? mw.ImageSources.FindSource("work_" + work.Name);
string source = mw.ImageSources.FindSource("work_" + mw.Set.PetGraph + "_" + work.Graph) ?? mw.ImageSources.FindSource("work_" + mw.Set.PetGraph + "_" + work.Name);
if (source == null)
{
//尝试显示默认图像

View File

@ -0,0 +1,16 @@
这里是工作图片目录, 给工作图片显示的
第一层: 如果实在找不到图片,显示的默认图
第二层(宠物皮肤id): 该宠物对应工作的图片
对于大类(play玩耍/study学习/work工作) 前面需要加't'前缀
顺带一提, 在桌宠文件系统中, 每个文件夹会自动转换成'_',
例如 "work\vpet\t\play.png" = "work_vpet_t_play.png"
This is the working image directory, which displays the working images
First layer: If the image cannot be found, the default image will be displayed
Second layer (pet skin ID): Image of the corresponding job for the pet
For major categories (play/study/work), the prefix 't' needs to be added before them
By the way, in the desktop pet file system, each folder is automatically converted to '_',
for example, "work\vpet\t\play.png" = "work_vpet_t_play.png"

View File

Before

Width:  |  Height:  |  Size: 154 KiB

After

Width:  |  Height:  |  Size: 154 KiB

View File

Before

Width:  |  Height:  |  Size: 158 KiB

After

Width:  |  Height:  |  Size: 158 KiB

View File

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

Before

Width:  |  Height:  |  Size: 205 KiB

After

Width:  |  Height:  |  Size: 205 KiB

View File

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 143 KiB

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 161 KiB

View File

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 202 KiB

View File

Before

Width:  |  Height:  |  Size: 129 KiB

After

Width:  |  Height:  |  Size: 129 KiB