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 / how can i make a picture a button?

Author
Message
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 16th Nov 2011 18:46
i would like to make a pause button so when it is touched the pause function is activated, i have the pause coding and it works but it pauses where ever i touch the screen can someone please help?

kirtnicholls
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 16th Nov 2011 20:25
There's at least two ways to do that...

Assign an image (or images) to a virtual button.

Use a sprite with an image to act as a button.

Both are very easy to code and have entries in the help files.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 16th Nov 2011 22:45
The virtual buttons are very limited, you have no control over how they display. It is definitely worth putting in more effort to make your own sprite buttons.

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 16th Nov 2011 23:18
Quote: "The virtual buttons are very limited, you have no control over how they display. It is definitely worth putting in more effort to make your own sprite buttons."


Agreed. But if you just need a small, square-ish image for the button up and down states, then the SetVirtualButtonImageUp and SetVirtualButtonImageDown commands are okay-ish.

Login to post a reply

Server time is: 2024-11-22 15:32:22
Your offset time is: 2024-11-22 15:32:22