ID:158189
 
I'm not sure how to do this. Here is what I have so far:

obj/Book/icon='Book.dmi'
mob/verb/Test()
var/obj/Book/B=new
winset(src,"Main Grid.Selected","image=[B.icon]")


Main Grid.Selected is a Label. I want Selected to show B's Icon.

How do I do that properly? This doesn't work
Using spaces in the control's name messes it up. Use _ instead, or enclose the control name in single quotes.
In response to Jeff8500
Jeff8500 wrote:
Using spaces in the control's name messes it up. Use _ instead, or enclose the control name in single quotes.

Seems like they would want to fix or disable that.

Anyway I have another problem.

mob/P=src
P.icon='Human.dmi'
winset(P,"Grid1.Selected","image='[P.icon]'")
//This works, the label shows P's icon.

mob/P=src
P.icon='Human.dmi'
P.icon+=rgb(50,50,50)
winset(P,"Grid1.Selected","image='[P.icon]'")
//This does NOT work. For some reason coloring the icon has made the label not show it. Even though I see it on P, which is the most I am playing as.


Help please? The label won't show the icon if I color it.
In response to Dragonn
Dragonn wrote:
Seems like they would want to fix or disable that.

There's nothing to fix there, that's just how it is, it's not a bug or problem. If any value you use in that kind of place contains any complex characters (non-alphanumeric), then you need to enclose it in quotes for it to be correctly interpreted.

Anyway I have another problem.
Help please? The label won't show the icon if I color it.

[link], see the last block of text.