ID:138942
 
Code:
                    var/obj/O = new
var/icon/Si=new('StoreClass.dmi',src.store.class)
O.icon=Si
test.Add(O)


src<<output(O,"StoreSelect.icon[i]:1,1")


Problem description:

Ok, so what i have is a 32x32 grid, and i only want to display the icon of the object , and then to be able to click it.

My problem is that the icon is not even showing up in my grid. What am i doing wrong? Thanks in advance.

If you want to show a player inside a grid, I'll give you an example on how I go about doing this.

mob/proc/UpdateGrid()
var/players = 1
winset(src,"window.grid1","cells=0x0") // Refresh the cells
src << output("Name:","window.grid1:1,1") // Show the Name title thing.
for(var/mob/P in world) // For every player in the world (this can be refined)
players ++ // +1 to players variable since your viewing it
src << output(P,"window.grid1:1,[players]") // Output all P's found in the world from our for()


The example above will let you update a grid with the player's name & icon inside of it. Sort of a 'Who' verb.
In response to A. Ness
Yeah I know that, that code works fine, but I'm wondering why my unique situation isn't working. I want the icon of the object (and only the icon) to completely fill the 32x32 grid I'm outputting it to. However, using the code I posted above it is not working the way I want it to.

Oh, and on a side note, I've already checked in the actual dmf file, not to display any text in the grid, so that's not it.
In response to Arcticblast
Ok, so i figured out that if i do this, it displays the icon like i want it to:

src<<output("\icon[O]","StoreSelect.icon[i]:1,1")


But how come my click procedure is not working? The object has a reference point.

atom
Click(location,control,params)
if(control=="StoreSelect.icon1")
usr<<"test"
..()


I've been working with grids so much, and i still fail at them. Please help, thanks in advance.