//this works
var/list/params = new
params["text"] = src.name
params["image"] = 'Button.dmi'
winset(src, "buttonElement", list2params(params))
//----------------------
//This does not
var/icon/i = icon('Button.dmi')
//var/icon/o = icon('OtherIcon.dmi')
//i.Blend(o,ICON_OVERLAY)
var/list/params = new
params["text"] = src.name
params["image"] = i
winset(src, "buttonElement", list2params(params))
Problem description:
In the above code, I can happily output an icon to a button if i call it directly, but if I define it as var/icon first, I cannot (which is necessary for the blend steps I want to do).
I know that using winset() to change image params has always been super buggy, so I can't tell if the desired method is bugging out or simply not possible. Or perhaps its possible and I'm not doing it the right way?
On a side note, is there a work-around to the bugs relating to 'image' param?
//if I have this any other way, it breaks.
//Note the variation in how the PNG files are referenced.
mob/proc/setGender(gender as text)
if(gender == "female")
winset (src, null, "male.image=['Male.png']; female.image=['Female_s.png']")
src.gender = FEMALE
else
winset (src, null, "male.image='Male_s.png'; female.image='Female.png'")
src.gender = MALE