Skip to content

Commit

Permalink
game: Invoke focus callback on button after action
Browse files Browse the repository at this point in the history
  • Loading branch information
mrannanj committed Jul 27, 2024
1 parent 3760709 commit 970ad59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game/gui/spritebutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ static int spritebutton_action(component *c, int action) {
if(sb->click_cb) {
sb->click_cb(c, sb->userdata);
}
if(sb->focus_cb) {
sb->focus_cb(c, true, sb->userdata);
}
return 0;
}
return 1;
Expand Down

0 comments on commit 970ad59

Please sign in to comment.