Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add family candy icon #228

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Conversation

hacknug
Copy link
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
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