Allow clicking within scroll bars to set position.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1438
This commit is contained in:
Simon Howard 2009-01-29 23:00:14 +00:00
parent 5a122d591e
commit 61361932bf

View file

@ -251,6 +251,12 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane),
{
++scrollpane->x;
}
else
{
int range = FullWidth(scrollpane) - scrollpane->w;
scrollpane->x = ((rel_x - 1) * range) / (scrollpane->w - 3);
}
return;
}
@ -266,6 +272,12 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane),
{
++scrollpane->y;
}
else
{
int range = FullHeight(scrollpane) - scrollpane->h;
scrollpane->y = ((rel_y - 1) * range) / (scrollpane->h - 3);
}
return;
}