ID:156166
 
Hey,

I'm currently working on a decent shopping system for my project, and this is what I've come up with:

I've got a Window-pane named "Inventory", with a grid "ItemGrid". This all works fine and dandy, inventory system works the way I want it to, but...
I've got a Child in my default interface that shows "Inventory". And now I'm trying to add an "enlarged" (zoomed-in version, if you will) version of the same pane ("Inventory").
So I've created a new Window "SellWindow", which included a Child that also shows "Inventory".

However, it seems that you can't show a parent in more than 2 childs. Is there a work-around? Is this intended? If I enable my "SellWindow", the Child in my default-interface returns blank. If I disable it, it shows again.

Also, if there is a way around this, would there be a way to "enlarge" the parent's pane through the Child? I'm currently still seeing really small icons in the big "SellWindow".

Thanks for your time!
You need to utilize the scripting that grids and outputs support.

Put the following into the style sheet of the output/grid element.
BIG IMG.icon {width: 32px; height: 32px}


Now whenever you output() to the grid/output element using the <BIG></BIG> tags and the \icon macro, the icon will appear whatever pixel dimensions you defined in the style sheet. You could do 16px X 16px, or 32px X 32px, or whatever.

Here's an example of how to utilize the output() proc like I described...
var/obj/apple/a = new
object<<output("<BIG>\icon[a]</BIG>","windowID.elementID")
In response to Spunky_Girl
I see. Sadly, that won't work because instead of being just icons, the objects are just that, click-able objects.

I've however found another tidy way to do this, and although the result is not a 100% to my liking, it's not a vital part to the game and I'm sure nobody will complain.

Thanks for your help any way, Spunky, as I'll now be sure not to overlook the Style tab next time something like this comes up!
In response to Emasym
If you are using a grid, and output the object into the grid, it will be Click()-able, as you so describe it. The style sheet code is merely to make its icon appear larger. Nothing else.