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 / Set size of clickable area on button?

Author
Message
AJ Schaeffer
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 4th Dec 2011 00:18
I have a custom button that doesn't fill up the entire image file.
How do I set the size of the area that can be clicked.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 4th Dec 2011 02:05
I haven't actually used the button commands yet but SetVirtualButtonSize()?

AJ Schaeffer
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 4th Dec 2011 02:33
That changes the size of the button sprite.
The extra space is still taken into account.

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 4th Dec 2011 02:41
I see what you mean now. Well you could write a manual work around. Just a bit of bounds checking. Some pseudocode:


Hope that makes sense? You'll have to do a bit of trial and error to work out those numbers though.

AJ Schaeffer
14
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 4th Dec 2011 02:50
On second thought I might just fix them in photoshop haha

Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 4th Dec 2011 03:03
That too

JavierTF
14
Years of Service
User Offline
Joined: 15th Feb 2010
Location: Going out, to the right
Posted: 4th Dec 2011 12:41
Hi

You can make a png and use the transparent area you need to click around the colored button.

Regards

Login to post a reply

Server time is: 2024-05-04 20:26:56
Your offset time is: 2024-05-04 20:26:56