mothra: keep scrolling while mouse buttons are down
This commit is contained in:
parent
ad08f08800
commit
6332fddecd
1 changed files with 17 additions and 19 deletions
|
@ -46,7 +46,6 @@ int pl_hitscrollbar(Panel *g, Mouse *m){
|
||||||
else if(pos>len) pos=len;
|
else if(pos>len) pos=len;
|
||||||
if(m->buttons&7){
|
if(m->buttons&7){
|
||||||
g->state=DOWN;
|
g->state=DOWN;
|
||||||
if(g->r.min.x<=m->xy.x && m->xy.x<g->r.max.x){
|
|
||||||
sp->buttons=m->buttons;
|
sp->buttons=m->buttons;
|
||||||
switch(m->buttons){
|
switch(m->buttons){
|
||||||
case 1:
|
case 1:
|
||||||
|
@ -66,7 +65,6 @@ int pl_hitscrollbar(Panel *g, Mouse *m){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else{
|
else{
|
||||||
if(!(sp->buttons&2) && g->state==DOWN && g->scrollee && g->scrollee->scroll)
|
if(!(sp->buttons&2) && g->state==DOWN && g->scrollee && g->scrollee->scroll)
|
||||||
g->scrollee->scroll(g->scrollee, sp->dir, sp->buttons,
|
g->scrollee->scroll(g->scrollee, sp->dir, sp->buttons,
|
||||||
|
|
Loading…
Reference in a new issue