A touchscreen UI with blitter

Started by lawless_c, February 26, 2014, 02:54:09 PM

Previous topic - Next topic

lawless_c

Is there what would be considered a good or standard way of doing a UI with the blitter?

For example if i want to place a button and make it touchable with it interfering with what is happening behind it how would i do that?

At the moment im thinking of simply doing a ray trace and checking if a line coming from the touch would intersect it but that might be wrong.

EgonOlsen

If you blit something, you already know the coordinates. Now all you need it to evaluate the touch coordinates and compare them to see if they are inside your gui element. You can either do this in a hacky way, if you all you need are a few buttons or you could write yourself a little gui framework for this. That shouldn't take you longer than a few hours to get something decent up and running.

lawless_c