However, note that, Agui does not take into consideration Allegro Transforms. If you scale the screen to be resolution independent, Agui will not respond to your mouse as you would expect.

My GUI does.

jmasterx

What do you use to apply the transformation to the mouse? I can easily implement it if I have that.

Thanks

Mark Oates

As it is now, Widgets do not respond directly to mouse events, they are "pre-processed" first. There are some al_invert_transform and al_transform_coordinates in there. The mouse positions and displacements are modified to native coordinate space and sent into the widget's update function for collision testing.

Also, widgets can have their own transform, too. Any widget can be scaled and/or rotated, and that transformation can have transformations prior to it while still doing mouse collisions correctly.

jmasterx

That's cool

Agui is backend independent so I always need to abstract away the underlying API in anything I add. I might look into the implementations of some of those allegro functions and use that. The user will be responsible for supplying me some kind of transform.

I could enforce that the backend handles this but I'm not sure that's the best idea...

jonny2027

Thanks for the information. I will give it a shot. Just out of interest what is your GUI Mark.

One thing though, to use it, you will need to render your game using the method where you render everything to a separate bitmap then blit that to the backbuffer. This is because Agui uses clipping rectangles and those don't like to be transformed it seems