Allow clicking within scroll bars to set position.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1438
This commit is contained in:
parent
5a122d591e
commit
61361932bf
1 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue