Re: mouse focus flag [was: Re: Re: Re: Re: [AD] minor fix] |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wed, 2004-07-07 at 16:28 +0200, Evert Glebbeek wrote:
> > If you make a patch so the non-transparent overlapping parts
> > of the widget in front can be clicked, and other clicks can be let
> > through to the map widget below, then I will gladly accept such a patch.
>
> The problem is that `transparent parts' is a bit vague when it comes to the
> Allegro GUI. It treats all widgets as solid boxes, as far as I know.
>
> This could be done easily with custom objects, where a masked bitmap could be
> used and the widget simply checks if it was clicked in a transparent area. I
> don't see how you could easily handle the general case though...
>
Yes, that's what I meant. You make a custom widget, which decides in
some way (not necessarily a masked bitmap, but that's what i was
thinking of as well) if it really was clicked, and tells that do the GUI
with Vincent's new D_WANTMOUSE. That way, it would be a general, sense-
making flag, and nothing would speak against adding it :)
The implementation could maybe be, loop through all the widgets in
reverse order, and send each one the MSG_WANTFOCUS. If one is found and
not responding D_WANTFOCUS, it is made the new mouse_object, and the
loop is left.
That way, everything will stay as it is, and the last dialog in the
array under the mouse gets the focus (all will reply D_O_K to
MSG_WANTFOCUS). If one replies D_WANTFOCUS instead (maybe better name it
D_DONT_WANTFOCUS) (since a transparent area actually was clicked in it)
- the loop continues to the next object.
--
Elias Pschernig