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 / color picker?

Author
Message
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jun 2016 17:19
Is there an existing dialog in AppGameKit for this? Or has anyone made one already?


Also, I had another question. I'm working on an app to design wire diagrams for custom cars to make things easier than using photoshop like I'm doing right now. I have no trouble drawing the wires, but I'm not sure how to efficiently do the striped wires. The user can pick two custom colors. Tiling an image's UV is the easy part and so is coloring... a solid image that is. I'm not sure how to do it without using two separate sprites, the top sprite having the stripes lay over another layer. Unless AppGameKit can do sprites with multiple textures?

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Jun 2016 18:42 Edited at: 5th Jul 2016 11:55
Regarding stripes....

You need
1. 1 image, black and white for the stripes. The stripe needs to be designed so that rotating 180 degrees will give you the opposing patterned stripe.
2. Create a sprite, setSpriteColor().
3. Create a second sprite, rotate 180 degrees, setSpriteColor()
4. GetImage()
5. Delete 2 sprites

Regarding colour selection, you can try and pick the bones out of the code below. You need the attached image also. In a nutshell, you click on the colour band and it will convert it to the associated colour.
I also combine it with a band that goes from black to white to change the saturation of the colour.

[EDIT] I posted the wrong code. This is the code to convert a position on the image to a colour. tColor is a typed variable:



- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-17 09:07:25
Your offset time is: 2024-11-17 09:07:25