summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2011-02-22 00:51:01 (GMT)
committer Simon <simon@hardwired.org.uk>2011-02-22 00:51:01 (GMT)
commita84234dcd4e5a3dfb4a62d73ff07df1e01bed086 (patch)
tree2b99a10c26f4f29703f31749b20e3796027918ef /src
parentff1aca9524b74985f1cce2da0ac96cf088fd5d52 (diff)
downloadpowder-a84234dcd4e5a3dfb4a62d73ff07df1e01bed086.zip
powder-a84234dcd4e5a3dfb4a62d73ff07df1e01bed086.tar.gz
Improvement to scrolling menu
Diffstat (limited to 'src')
-rw-r--r--src/interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interface.c b/src/interface.c
index e43bd9a..a762b39 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -1653,8 +1653,8 @@ void menu_ui_v3(pixel *vid_buf, int i, int *sl, int *sr, int b, int bq, int mx,
}
else
{
- if (fwidth > XRES){
- float overflow = fwidth-XRES+BARSIZE, location = ((float)XRES+BARSIZE)/((float)(mx-XRES+BARSIZE));
+ if (fwidth > XRES-BARSIZE){
+ float overflow = fwidth-(XRES-BARSIZE), location = ((float)XRES-BARSIZE)/((float)(mx-(XRES-BARSIZE)));
xoff = (int)(overflow / location);
}
for (n = 0; n<PT_NUM; n++)