Re: [AD] src/gui.c hotkey and hidden widgets patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Allegro does not send hotkeys to hidden widgets, which seems
> a bit odd, especially as it does not do it for disabled
> widgets too. It could break some existing code, but I think
> the probability is rather low. And the behavior seems a bit
> broken anyway :)
>
>
> --- gui.c.msg Sun Jul 29 13:48:26 2001
> +++ gui.c Sun Jul 29 13:49:02 2001
> @@ -981,7 +981,7 @@
> if ((((cascii > 0) && (cascii <= 255) &&
> (utolower(player->dialog[c].key) == utolower((cascii)))) ||
> ((!cascii) && (player->dialog[c].key == (cscan<<8)))) &&
> - (!(player->dialog[c].flags & (D_HIDDEN | D_DISABLED)))) {
> + (!(player->dialog[c].flags & (D_DISABLED)))) {
> MESSAGE(c, MSG_KEY, ccombo);
> goto getout;
> }
Huh? Why should a hidden widget get a hotkey? This change would break a
lot of code, most of it mine. Why would you want a hidden widget to get a
keystroke? If you want it to get keystrokes, why do you have it hidden,
where it can't do anything else, either?
In my mind, hidden objects are disabled objects that are hidden rather than
grayed out. If this "hidden but active" functionality is something we need,
we'd be better to create a D_HIDDENACTIVE flag rather than suddenly change
the "meaning" of being hidden.
--Chris