On 5/10/2016 at 11:40 AM, Thomas Fjellstrom <[email protected]> wrote: >On Tue 10 May 2016 09:47:10 AM Andrew Robinson wrote: >> I understand your nightmare, but all hope is not lost. For example, how >> about incorporating show_mouse(NULL) in the destroy_bitmap() function? If >> mouse_init() was never called, and instead of crashing or erroring out, >> just gracefully handle that exception and ignore it, backwards >> compatibility would be retained and the API will make more sense in that >> regard.
>Its still a behavior change. Whether its one that will break anything remains >to be seen. >That said, that isn't and entirely valid change. You'd have to check to see if >the bitmap being destroyed is the bitmap that is currently the target for the >mouse. You don't want destroy_bitmap clearing the show_mouse() bitmap every >time, even if it isn't the target. How is it any different then if I only call show_mouse(screen) and then exit the program? I don't have to call show_mouse(NULL) then. So can I call destroy_bitmap() without having to call show_mouse(NULL) if I target a different bitmap before destroying it? What is the difference between show_mouse(bitmap) and show_mouse(screen), i.e. -- why do I have to target a bitmap instead of the screen? Afterall, the mouse never draws anything on the bitmap or the screen, that's what functions like circlefill() and draw_sprite() are for. It makes more sense to call circlefill(bitmap) or draw_sprite(bitmap), but show_mouse(bitmap) ... that doesn't make sense. All I need any mouse function(s) for is to give me x and y coordinates of the mouse, tell me which button(s) has been clicked on the mouse, and change the mouse cursor type, which is what show_os_cursor() does, so what's up with this show_mouse(bitmap) or show_mouse(screen) thing? The Allegro API's don't provide me with enough information on this, or it isn't easy to find, so it makes me leery of using show_mouse(). Is show_mouse() a custom Allegro driver for the mouse? If yes, then that driver behavior needs to be documented. _______________________________________________ Allegro-developers mailing list [email protected] https://mail.gna.org/listinfo/allegro-developers
