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 / Changing colour of png image

Author
Message
Doveyy04
12
Years of Service
User Offline
Joined: 30th Apr 2012
Location:
Posted: 7th Jun 2012 00:33
My program uses png images created using Microsoft paint as sprites that you click on using the getpointerpressed command to get to other parts (ie new game, load game, options etc) but I want the sprites to change colour slightly when pressed then proceed onwards. I tried setspritecolor along with the sleep command to show the colour change quickly before proceeding but it didn't change colour, have I got to create another png image of the colour I want then get the program to create sprite etc over the top of the original image?? Seems a bit long winded. Thanks for your help
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 7th Jun 2012 00:53
SetSpriteColor is the right command to use.

1. You cannot use saturated images as your base, the colour change won't show. Use lighter colours, White/Grey are the best options

2. Sleep isn't a good option as the program stops (I'm guessing you never SYNC()ed after the sleep either?). It would be better to set a timer, and reset the colour a few cycles later.

Login to post a reply

Server time is: 2024-05-09 00:06:12
Your offset time is: 2024-05-09 00:06:12