RGBA color picker + paint
Posted: Mon Jan 25, 2010 1:05 pm
I was planning to include a widget in my game that allows the user to draw their own custom logo for their space fleet. It started off as a color chooser, then got some drawing functions.
To keep it simple, i didn't use any data files, therefore nothing is labelled in game mode. On the toolbar, the buttons are (from left): Paintbrush, color dropper, createnew(smaller), createnew(larger), save, and load. You must click on paintbrush before drawing again after clicking one of the other tool buttons.
There are two sliders: the one on the left controls brightness, while the one on the right controls transparency. If you want to see how any of this was done, the code is all thoroughly documented.
Now i need to find a way to draw the final image several times in a game, without using a slow canvas draw(you can have 300 ships and, if you selected them all, the logo would appear over each one).
Anyone have any ideas on how to do this?
To keep it simple, i didn't use any data files, therefore nothing is labelled in game mode. On the toolbar, the buttons are (from left): Paintbrush, color dropper, createnew(smaller), createnew(larger), save, and load. You must click on paintbrush before drawing again after clicking one of the other tool buttons.
There are two sliders: the one on the left controls brightness, while the one on the right controls transparency. If you want to see how any of this was done, the code is all thoroughly documented.
Now i need to find a way to draw the final image several times in a game, without using a slow canvas draw(you can have 300 ships and, if you selected them all, the logo would appear over each one).
Anyone have any ideas on how to do this?