- Fix scrollbar crash BoxLib example.
git-svn-id: svn://kolibrios.org@8508 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
c45b7e611a
commit
a0d5358c87
@ -73,6 +73,7 @@ int main()
|
|||||||
|
|
||||||
case KOLIBRI_EVENT_KEY:
|
case KOLIBRI_EVENT_KEY:
|
||||||
edit_box_key(&ed, get_key().val);
|
edit_box_key(&ed, get_key().val);
|
||||||
|
draw_window();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KOLIBRI_EVENT_REDRAW:
|
case KOLIBRI_EVENT_REDRAW:
|
||||||
@ -97,6 +98,9 @@ int main()
|
|||||||
}
|
}
|
||||||
else if((short)wheels < 0 && scroll.position > 0){
|
else if((short)wheels < 0 && scroll.position > 0){
|
||||||
scroll.position -= scroll_strong;
|
scroll.position -= scroll_strong;
|
||||||
|
if((int)scroll.position<0){
|
||||||
|
scroll.position=0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
scrollbar_v_draw(&scroll);
|
scrollbar_v_draw(&scroll);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user