Scrolling Image Sliders
Blitz3D Forums/Blitz3D Programming/Scrolling Image Sliders
| ||
I've got a setup that does a DrawImageRect to show only part of the pictures that are bigger than 600x600. It has buttons with arrows that move the image left and right, to the borders of the image, and between those arrows, it has a little bar that you can click and drag to speed up the scrolling. I want to know how I'd go about positioning that little bar perfectly in respects to the image height and width (remaining between the arrows though, about 0-600 pixels) Thanks. |
| ||
you should do something like: the screen width is 600 the image width is say 850 diffrence=850-600 ratio# = diffrence# / 600.0 scroll_x# is the location of the slider drawblock image, -(scroll_x# * ratio#), 0 |