I've made an image for a volume control button (see attached image). What I want is, itouching the top half of the button increases the volume and touching the bottom half decreases the volume.
Is there a way in Gideros to implement multiple "hitTestPoint"s within an image?
If not, will the method below work?
My idea is to create a group with the base image (the volume control button image) as the bottom layer. Then create a shape (volumeUp = Shape.new()) that is half the size of that image and position it over the top half of the button and create another shape (volumeDown = Shape.new()) that is half the size and position it over the bottom half of the button. I will set the alpha of these shapes to 0 so they aren't seen. Then I can use volumeUp:hitTestPoint and volumeDown:hitTestPoint in the function for changing volume.
Again, will this work? Will the fact that the alpha is 0 cause a problem?
Comments
Likes: antix
Fragmenter - animated loop machine and IKONOMIKON - the memory game
TextureRegion
http://docs.giderosmobile.com/reference/gideros/TextureRegion
Likes: talis
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: antix
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Thanks again.
Likes: antix