ID:154985
 
Hello. I have two questions/problems:
1. When I go to ...\Byond\Skins\maker\game and open skin file, all images of labels and buttons disappear. They don't show up after I run the game either. The only way to fix it is to delete these skin files and run the game again. Is there a way to prevent image deletion? It would be great if images didn't disappear every time skin file is opened, because it would allow people to make custom skins if they want to.
2. What would be correct way to change the image of label button during run-time? Lets say I want to change the image of button1. I need to change it's image from image1.bmp to image2.bmp. Both images are in subfolder "Other images".

If anything isn't clear, please tell me. Thank you for help.
1) Don't put your image files inside your MyDocuments/BYOND/etc... Put them inside your games source folder.

2)
winset(src,"default.button1","image=/Other Images/image1.bmp")
In response to A. Ness
I haven't tested or checked, but I'm pretty sure he'd need to make sure that there were no spaces in that or the params would break.
In response to A. Ness
1) Actually, I was talking about modifying personal skin files. For every game you ever played, you get their skin file, which is saved in (can be any drive, not only C:) C:\Byond\Skins\author\game. You can freely modify these if you want. However, once you open it, all images disappear and only way to fix it is to delete these files and run the game again. I wanted to know if there is a way to open it without images disappearing.

2) It seems like you actually need to use backslashes(\) when defining path:
winset(src,"default.button1","image=Other_Images\\image1.bmp")


EDIT: I think I know how to fix 1). You need to put image files in the folder with skin files and only then open it.

Thanks for help.