Skip to content

Commit

Permalink
Added support for mouse wheel in text areas.
Browse files Browse the repository at this point in the history
  • Loading branch information
gabordemooij committed Jun 22, 2024
1 parent 8970274 commit 06c8f75
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions plugins/media/media.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,15 @@ ctr_object* ctr_media_screen(ctr_object* myself, ctr_argument* argumentList) {
return myself;
}
break;
case SDL_MOUSEWHEEL:
if (focusObject) { //only for text areas
if (event.wheel.y>0) {
ctr_internal_media_keydown_up(NULL, NULL);
} else {
ctr_internal_media_keydown_down(NULL, NULL);
}
}
break;
case SDL_MOUSEMOTION:
if (CtrMediaSelectStart && focusImage) {
focusImage = ctr_internal_media_getfocusimage();
Expand Down

0 comments on commit 06c8f75

Please sign in to comment.