Skip to content

Instantly share code, notes, and snippets.

@tterrag1098
Created December 5, 2013 07:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tterrag1098/7801442 to your computer and use it in GitHub Desktop.
Save tterrag1098/7801442 to your computer and use it in GitHub Desktop.
private Icon[] icons = new Icon[2];
private int iconIndex = 0;
registerIcons()
{
icons[0] = register.registerblahblah
icons[1] = register.registerblahblahsomethingdifferent
}
getIcon()
{
return icons[iconIndex];
}
onBlockActivated()
{
iconIndex = iconIndex == 0 ? 1 : 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment