GUI Design tricks

Started by
0 comments, last by Burnt_Fyr 12 years, 11 months ago
Hello everyone!
I've been writing a reusable GUI library for myself to use in some projects to make designing a game a bit easier. I've been writing a function that creates a scroll box that should function like a normal scroll bar, however I am not quite sure as to what functions I need to do to capture that true scrolling when clicked feel. I've tried Mouse Delta but it just seems to push the scroll bar instead of having the scroll bar itself follow the mouse.

Any ideas?
Advertisement

Hello everyone!
I've been writing a reusable GUI library for myself to use in some projects to make designing a game a bit easier. I've been writing a function that creates a scroll box that should function like a normal scroll bar, however I am not quite sure as to what functions I need to do to capture that true scrolling when clicked feel. I've tried Mouse Delta but it just seems to push the scroll bar instead of having the scroll bar itself follow the mouse.

Any ideas?


What I do is store the XY position of the mouse on mouse down, and on each mouse move get new coords and subtract from the stored position to get the delta position. I then adjust scroll bars button position by that delta.

This topic is closed to new replies.

Advertisement