Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] Creating virtual Buttons for Android

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Jan 2022 09:37
I know how to use virtual buttons but I want to create my own , so my question is how do I make an area of the screen sensitive to touch. Thanks.

The author of this post has marked a post as an answer.

Go to answer

Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 19th Jan 2022 10:04
This post has been marked by the post author as the answer.
This is my own code

Study it

and use it how you need


loading images and setting them to buttons




Small example how to use the buttons

Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Jan 2022 10:16 Edited at: 19th Jan 2022 20:08
Thankyou very much this is what I wanted to know.
Not exactly what I required but very good to know how to use a joystick for PC using AGK.
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 19th Jan 2022 20:00 Edited at: 19th Jan 2022 20:14
Well I have tried it and works well . The way I did it was to make a virtual button set it to invisible then put my custom button (a sprite) exactly the right size in it's place (over the top of it). Works really well and very accurate.
It's a good day when I learn something new. Thanks.

Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 19th Jan 2022 22:54
Well I am happy you got it working.

I also have the buttons to go with it if you need them.

Login to post a reply

Server time is: 2024-03-28 16:37:59
Your offset time is: 2024-03-28 16:37:59