Author Topic: A touchscreen UI with blitter  (Read 756 times)

Offline lawless_c

  • int
  • **
  • Posts: 91
    • View Profile
A touchscreen UI with blitter
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11744
    • View Profile
    • http://www.jpct.net
Re: A touchscreen UI with blitter
« Reply #1 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.

Offline lawless_c

  • int
  • **
  • Posts: 91
    • View Profile
Re: A touchscreen UI with blitter
« Reply #2 on: February 27, 2014, 10:36:02 am »
okay i'll try that  :)