www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: lawless_c on February 26, 2014, 02:54:09 pm

Title: A touchscreen UI with blitter
Post by: lawless_c on February 26, 2014, 02:54:09 pm
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.
Title: Re: A touchscreen UI with blitter
Post by: EgonOlsen on February 26, 2014, 08:59:20 pm
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.
Title: Re: A touchscreen UI with blitter
Post by: lawless_c on February 27, 2014, 10:36:02 am
okay i'll try that  :)