So I was trying to use grid controls to make a typical RPG equipment display, but since I wanted them to be spread out around a humanoid outline, I tried using a bunch of single cell controls. I thought this would be nice also because I can refer to them directly using their ID rather than some meaningless coordinates...but the problem is, when an item is added, the grid splits into two cells and the item is obscured from view.
The grid controls are 32x32, as are the icons of the objects going into them. I have been playing around with making them a flexible list/not, manually changing the cells paramater, and it seems there is always a second cell added on which pushes the first cell to the side. Does anyone have any experience with this problem, or should I just forget about using grid controls and program it myself?
Jan 21 2013, 10:00 am
|
|
Can you show the code used to either drop the item of equipment into the single cell grid or however you're doing it? I've had this problem before and may be able to help if I can see it. :)
|
If you're showing them on the client.screen, just ditch grid coordinates and use pixels
atom.screen_loc = "1:352,1:478"
Edit: Never mind, I just realized you're using interface and not in-game GUI. |
Well I got it to work by making the grid controls slightly bigger...I'm pretty sure it is unrelated to the way output() is used or anything like that, if I want to re-do it I will just have to use my own object
|
Are you setting the number of total cells contained by the grid?
src << output(someTHING, "mygrid:1,1") |
yes, I tried that and it still doesn't seem to work. The cell gets pushed off to the left side...you can still interact with it and you can see it if the icon is not transparent on the rightmost 6 pixels or so :)
|
The behavior is the same with show lines on and off. I enabled it so you can see what is happening:
The object is there on the left side of the line, and you can click on it and interact with it as normal if you click on the left side. The right side I guess is an emtpy cell. As you can see in the second image, increasing the size from 32x32 to 40x40 works alright. |
hmm...that may be worth looking into in the future. For now I'm happy with my hacky fix :)
|
Sofa I am experiencing the same problem, my current way of doing it is having the grid size 40x40, then set the background color to what you wish, then just delete the background color on the icon state. After that just output it. Its limited but makes it look like its worked.
|
What do you mean by delete the background color on the icon state? My icons are all transparent, so the background is just whatever I set in the interface editor
|