Skip to content

Instantly share code, notes, and snippets.

@OkiStuff
Created November 20, 2021 15:53
Show Gist options
  • Save OkiStuff/dc4dd627ae9feb1552ae51eb3e3dd0d1 to your computer and use it in GitHub Desktop.
Save OkiStuff/dc4dd627ae9feb1552ae51eb3e3dd0d1 to your computer and use it in GitHub Desktop.
void clean_box_handle(int event, widget* self)
{
switch (event)
{
case HOVER:
clean_box_animation = 2;
break;
case PRESSED:
clean_box_animation = 1;
break;
default: // Normal
clean_box_animation = 0;
break;
}
self->object = &clean_box[clean_box_animation];
}
// clean_box is an array with all 3 frames of the animation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment