ID:163153
 
Hello everyone

Im using a grid to show the inventory, and I want the equippeds object's name to appear in a different font color, lets say, appear in blue, and the non-equipped appear in black.

Is that possible? First thing I tried was Html in the name, and I found that doenst works. How to, so?

Thank you!
When you equip the item u can do something like:

name="<font color = blue>[name]"

And after unequip:

name="[name]</font color>"
In response to HM Geek
hmmm.. I think you tried using html there? grid doesnt suports that, I belive. Only if there's some hidden property that I dont know...
Nobody? O.o
It's possible, I just dont know how to do it.
In response to Knifo
thank ya for the hope =D
HTML... Does work in grids. It took me the best part of 10 seconds to test it, and I am pretty sure it is also stated in the help file that it works.

Anyway. You'd basically do something like...
if(weapon.equipped)
usr << output("<font color='#0000FF'>[weapon]</font>","grid:[column],[row]")
else
usr << output("<font color='#000000'>[weapon]</font>","grid:[column],[row]")


Obviously, that wouldn't work in it's self, but you'd basically do something like that but tailor it to your code (you basically only need to look at the usr << output lines to see how to change font colour in a grid).
Although, from what I am aware when you change a font colour in a cell it effects all of the font in the cell. So you couldn't have something like...
Weapon: <font color='#0000FF'>Sword</font>
In one cell, you'd need to make two.