'Ello BYOND's Elite, it's been a long time since I've needed to post here but this just isn't making sense to me.
I'm trying to change the image of a button in my screen, I use Interface commands all the time but I have never tried to change something's icon before.
So what I've been trying to do is,
winset(src, "WindowChat.ChatLock", "image='Lock.dmi'")
(WindowChat being the window, and ChatLock being the button)
(I've tried variations of this, of course. Lock.dmi without the '' around it and whatnot.)
Which clearly doesn't work.
Now I have done a winget on the buttons current image, which returns as Locked.dmi (the icon I want to change it FROM)
To anyone wondering what it is I'm doing, I'm putting a small padlock button at the top that a player can push to make the window re-sizable or not
That works fine but this dang button won't change.
// In here, 'Lock.dmi' is considered just text. |
To anyone curious, I had to set a variable as the icon before hand
So instead of just
winset(src, "WindowChat.ChatLock", "image='Lock.dmi'"
I had to do
var/I = 'Lock.dmi'
winset(src, "WindowChat.ChatLock", "image=[I]")