ID:143539
 
Code:
world
mob = /mob/test
mob
test
icon='test.dmi'
icon_state="testing"
Login()
testproc()
proc
testproc()
var/i=1
winset(src,"Vitals",{"current-cell="1,[i++]""})
src<<output("<IMG CLASS=icon SRC=[src.icon] ICONSTATE='[src.icon_state]'>","Vitals")


Problem description: Image does not show in Grid. I am trying to get an image to show up on a grid, any suggestions?

Try \ref[src.icon] instead of [src.icon].

Lummox JR
In response to Lummox JR (#1)
That didn't seem to work, either.
In response to SpikeNeedle (#2)
Having the same problem here. While trying to recreate a stat pannel in grid form I can't seem to place any type of icon inside which is weird because I have a fully functional inventory that works on the same principal.

src<<output("<center>[src.icon]","stat")

It just doesn't show up.
In response to Body (#3)
Body wrote:
Having the same problem here. While trying to recreate a stat pannel in grid form I can't seem to place any type of icon inside which is weird because I have a fully functional inventory that works on the same principal.

src<<output("<center>[src.icon]","stat")

It just doesn't show up.

That's because you need to be using the \icon text macro.

Lummox JR
In response to Lummox JR (#4)
Great, it works! Now on to my next problem. How do I size the icon to the correct proportions? I appreciate your help!

Edit: I should probably mention that the script in the ref (<STYLE>BIG IMG.icon {width: 32px; height: 32px}</STYLE>) doesn't seem to have an effect when I put it to use in the grid. I even tried putting it in the CSS box in the interface designer fo the particular gird I need it for, but nothing.
In response to Body (#5)
Body wrote:
Great, it works! Now on to my next problem. How do I size the icon to the correct proportions? I appreciate your help!

Edit: I should probably mention that the script in the ref (<STYLE>BIG IMG.icon {width: 32px; height: 32px}</STYLE>) doesn't seem to have an effect when I put it to use in the grid. I even tried putting it in the CSS box in the interface designer fo the particular gird I need it for, but nothing.

The style should be applying okay in the grid's CSS box, but it definitely won't use the style from your .dms file. I'll test this and see if it works okay for me.

[edit]
Yes, everything definitely works okay at my end. I'd double-check that the style you wanted got added okay to the grid.

Lummox JR
In response to Lummox JR (#6)
Lummox JR wrote:
Body wrote:
Great, it works! Now on to my next problem. How do I size the icon to the correct proportions? I appreciate your help!

Edit: I should probably mention that the script in the ref (<STYLE>BIG IMG.icon {width: 32px; height: 32px}</STYLE>) doesn't seem to have an effect when I put it to use in the grid. I even tried putting it in the CSS box in the interface designer fo the particular gird I need it for, but nothing.

The style should be applying okay in the grid's CSS box, but it definitely won't use the style from your .dms file. I'll test this and see if it works okay for me.

[edit]
Yes, everything definitely works okay at my end. I'd double-check that the style you wanted got added okay to the grid.

Lummox JR


You're right, it does work. My mistake was that I put the <STYLE></STYLE> tags inside the box along with the script. Sorry to put you through the trouble, but thanks for your help!