Build Your Own Arcade Controls Forum

Software Support => DOS/WinCab => Topic started by: froggerman on April 28, 2007, 12:00:50 am

Title: Icons over Displays
Post by: froggerman on April 28, 2007, 12:00:50 am
This is probably a silly question, but I would like to put a clickable icon on top of a display. If I do this the display cannot be seen. If I put a clickable icon on top of a non-clickable icon, there is no problem.

Why can I not put a clickable icon on top of a display?

Title: Re: Icons over Displays
Post by: Chris on April 30, 2007, 08:45:41 am
This is probably a silly question, but I would like to put a clickable icon on top of a display. If I do this the display cannot be seen. If I put a clickable icon on top of a non-clickable icon, there is no problem.

Why can I not put a clickable icon on top of a display?
Is it the display that can't be seen or the icon?

For performance reasons, each UI element updates individually.  When the display re-draws itself, it doesn't know that there's an icon in front of it that also needs to be redrawn, so the icon would "disappear".  When you move your mouse over where the icon was, it needs to redraw itself so it suddenly "re-appears".  To handle this properly, I would need a way to tell each element where it's supposed to be in the "z-order" and then after every update work up through the Z-order and find every element that overlaps to see if it needs to be redrawn, then repeat the process with any redrawn elements, which may trigger the process with more elements.  And of course there's the issue of clicks and mouse-overs; those events would go to all objects that overlap in a particular space. None of this is impossible to deal with, of course, but it's easier to just say "Don't do that".  I'll take a look at this as I redesign the display system and see if there's something I can do about it.

--Chris
Title: Re: Icons over Displays
Post by: froggerman on May 01, 2007, 11:05:30 am
Hi Chris,

Thanks for the explanation. I was trying to make a clickable area on top of the credit display. The problem was that when I did this you can no longer see the credit display. The reason for trying to do this was to allow for another touch-button on a busy UI.

No worries, I moved the icon above the display so that it doesn't cover any part of it.
Title: Re: Icons over Displays
Post by: Chris on May 01, 2007, 12:33:43 pm
Hi Chris,

Thanks for the explanation. I was trying to make a clickable area on top of the credit display. The problem was that when I did this you can no longer see the credit display. The reason for trying to do this was to allow for another touch-button on a busy UI.

That's odd.  The worst that should happen is that you occasionally lose part of the button image.  Can you send me the skin file with your modifications?  Something I did to enable transparent display backgrounds could be wrong.

--Chris