[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> AL_CONST makes no sense there, an int is always const in C.
Not quite. You can't change the value and pass it back to the caller, but
you can change the value of the parameter within the function itself.
> Compilation stops here (I think I should put back the patch to make
> warnings default, in WIP versions.):
Nah, I should have tested with that. It was late though :)
I'm going to grep for in what files mouse drivers are present. I have a
suspicion that I may have missed a few for other platforms too.
> I tested it (in linux), and it seems to work. Should update exmouse to
> demonstrate the different cursors. And, there should be another function
> set_mouse_cursor(int cursor, BITMAP *bmp) (or different name), similiar
> to set_mouse_sprite.
To change the default Allegro cursor? I thought about adding that (in fact,
I used to have it), but I'm not so sure about it now. You're requesting the
default system cursor, so IMHO it doesn't make sense for the user to say
something like `ok, give me the default Windows pointer, but if you can't
do that, I don't want Allegro's, I want to use my own instead'. You either
accept the default system pointer or you don't, in which case you'd use the
default Allegro cursor anyway.
That said, I have no real objection to adding it, so I probably will (maybe
not for this release though).
> Or maybe set_mouse_sprite should always modify the
> current one?
No, I don't really like that solution. Afterall, we got rid of text_mode
because we didn't like states ;)
> Could also think about making the global mouse_sprite
> always point to the current sprite.
There is none if a system cursor is used. Ok, minor point, it could be NULL
in that case.
> Anyway, for 4.1.17, this one is ok to apply. We still have time for
> 4.2.0 to finalize the cursors API.
True. I'll fix the mouse driver warnings and apply it.
After that, the GUI and grabber should be made aware of this change as well
(GUI is easy: if there is no mouse being displayed, or if a default system
pointer is in use (as indicated by the new gfx_capabilities flag), then
it's ok to change the mouse pointer to reflect the current context, such as
the vertical beam for text fields).
Evert