ID:273303
 
.
Okay, what i have been trying to achieve is adding font-style to a label with buttons.

I have thought of adding each style to a list when the button is clicked, and using a for loop to see the contents of the list. If the button is unpressed it would remove the style element from the list. This has not worked for me.

Any ideas on a way to do this?

Also check out my Sticky Notes application if you need a gist of what i'm trying to do.
http://www.byond.com/games/NationalGuardsmen/StickyNotes

Thanks
winset(thatguy,"labelname","text=<font style= WINGDINGS LOL>[wutlabelsays]")


is that what you want? that should set the font's style iirc.
otherwise i don't get what you're asking
In response to Zaole
Im trying to apply multiple font-styles at runtime. Like say you click Bold and Underline, this would make the font-style=bold underline. Now say a person un-checks Bold, it should remove bold from the font-style and leave underline.

In response to National Guardsmen
ah. well, a really contrived way you could do it would be to have a proc that, based on its given argument, would change the format type to a predesigned type; ie (bold and italic)[message], or (just italic)[message], or (just bold)[message], etc

the usefulness of that method depends on how many different possible formats you want to offer
In response to Zaole
var/Z=""
Strike()
if(!strike)
winset(usr,"Publish.strike","border=sunken")
strike=1
style.Add("strike,")
for(var/A in style)
Z+="[A]"
winset(usr,"Publish.pre",{"font-style="[Z]""})
world<<Z
else
winset(usr,"Publish.strike","border=none")
strike=0
style-="strike,"
for(var/A in style)
if(A=="strike,")
style.Remove("strike,")
Z+="[A]"
world<<Z
winset(usr,"Publish.pre",{"font-style="[Z]""})


This is what i have tried doing with a list. It adds the values correctly, i just cant manage to remove the text string from the list.
In response to National Guardsmen
Solved