Re: [AD] scare_mouse_area |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sun, Dec 19, 1999 at 11:10:43PM +0000, Shawn Hargreaves wrote:
> freeze_mouse_flag = TRUE;
> scare_mouse_area(...);
> draw some stuff
> unscare_mouse();
> freeze_mouse_flag = FALSE;
>
> but that can be handled correctly if it is done using a stack.
Hmmm, I don't know why I assumed the correct way was to use ++ and -- ....
Maybe so the calls can be interleaved ? If the user issues the code:
freeze_mouse_flag=TRUE;
update_dialog(foo);
// draw some stuff
freeze_mouse_flag=FALSE;
and the dialog contains a widget that does:
freeze_mouse_flag=TRUE;
// draw some more stuff
freeze_mouse_flag=FALSE;
then this will lead to the second drawing be unprotected!
The Right Way(tm) to do things whould really be ++ and --, no ?
BTW, that's why I ever disliked the cld and std opcodes, since they don't
do ++ and -- even :(
> Unfortunately you are about an hour too late though, as I already wrote
> this myself. Also it is better to change docs/allegro._tx, since the .txt,
> .html, etc, are all generated from that.
Yep, thought of that too late :)
Next time Wilco :)
--
Vincent Penquerc'h
Windows NT - New Trial