About Store Forum Documentation Contact



Post Reply 
Possible bug with GuiImage
Author Message
fatcoder Offline
Member

Post: #1
Possible bug with GuiImage
There appears to be an ordering problem with drawing and input when using a GuiImage that overlaps other controls, such as a button for example.

If you want to add a GuiImage to a window and then add a Button (to the same window) and have the button sit on top of the image, you would do something like this.

Code:
window += image.create()
window += button.create()

The problem is that the image draws on top of the button, but the button can still receive input (i.e. you can click the button even though you can't see it).

If you try reversing it like this.

Code:
window += button.create()
window += image.create()

Then the image draws under the button (so you can see the button now), but the button cannot receive input (i.e. you cannot click on the button even though you can see it).

I have tried using things like moveToTop() and all the others but nothing makes any difference. I believe there might be a bug with the way GuiImage is being drawn as the first code example should be the correct way to do it. In that example the input works as expected, it is just the image is being drawn out of order.

I have also tried overriding GuiImage to draw it myself, but that doesn't solve the problem. So there must be an internal Gui problem that is drawing images out of order with the rest of the controls.
01-22-2012 01:55 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: Possible bug with GuiImage
are you using a custom Window class and manually draw the children?
perhaps you're drawing them in reversed order
01-24-2012 11:49 AM
Find all posts by this user Quote this message in a reply
fatcoder Offline
Member

Post: #3
RE: Possible bug with GuiImage
FREP instead of REP... pfft What a goose!
01-25-2012 03:13 AM
Find all posts by this user Quote this message in a reply
Post Reply