1
Fork 0

Mousewheel scrolls pattern editor.

This commit is contained in:
EvanR 2009-02-03 16:45:25 -06:00
parent 147382fc5a
commit d05a3f7feb
1 changed files with 7 additions and 1 deletions

View File

@ -86,7 +86,7 @@ int PianoRoll::handle(int event){
int X = event_x();
int Y = event_y();
int yprime;
int prevt;
switch(event){
@ -94,6 +94,12 @@ int PianoRoll::handle(int event){
return 1;
case fltk::FOCUS:
return 1;
case fltk::MOUSEWHEEL:
yprime = scrolly+32*event_dy();
if(yprime<0){yprime=0;}
if(yprime>75*12 - h()){yprime = 75*12 - h();}
scrollTo(scrollx,yprime);
return 1;
case fltk::SHORTCUT:
if(event_key()==fltk::DeleteKey){
apply_delete();