Skip to content

Add family candy icon#228

Open
hacknug wants to merge 5 commits into
vinnymac:developfrom
hacknug:feature/candy-icon
Open

Add family candy icon#228
hacknug wants to merge 5 commits into
vinnymac:developfrom
hacknug:feature/candy-icon

Conversation

@hacknug
Copy link
Copy Markdown
Contributor

@hacknug hacknug commented Apr 26, 2017

This PR adds a custom candy image with the family candy colors next to the candy count. It uses only three images to generate the given candy icon using canvas every time the modal loads. The icon is generated at 256×256 (original source size) and then scaled down to 24×24 to make sure they look good (or at least waaaaaay better than they would if generated at 24×24 directly).

Most of the code was adapted from RMKane's candy experiment here: http://rmkane.com/experiment/pokemon/candy/index.html

This is how it looks like:
captura de pantalla 2017-04-26 a las 17 23 52
captura de pantalla 2017-04-26 a las 17 23 37
captura de pantalla 2017-04-26 a las 17 23 16
captura de pantalla 2017-04-26 a las 17 22 55

To-Do

  • Get rid of those for loops
  • Do some testing to make sure no candies use the wrong colors (they shouldn't but I did some things by hand, so…)

@vinnymac
Copy link
Copy Markdown
Owner

@hacknug very pretty 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants