-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI: Add scrolling #118
base: master
Are you sure you want to change the base?
GUI: Add scrolling #118
Conversation
Although stuttering occurs when scrolling through the world select list, it also does when dragging, so this isn't a problem with this PR. |
|
||
void ScrolledSelectionList::handleScroll(bool down) | ||
{ | ||
float diff = 5.0f * (down ? -1.0f : 1.0f); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels weird. Like, when you scroll up, and then down, it seems to "continue" scrolling in the direction I was first scrolling in. Maybe it should just instantly set the velocity.
Also I think you should add a timeout of a few ms where the world select is just loose (as if you were holding a finger on the scroll area)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is for RolledSelectionList? Problem doesn't appear with ScrolledSelectionList.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, oops... Comment is related to RolledSelectionList.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub forces me to write something here as well. All's good, except for that one issue I just mentioned.
{ | ||
float diff = 5.0f * (down ? -1.0f : 1.0f); | ||
field_34 = field_30 = field_30 + diff; | ||
field_28 = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should probably rename the unnamed fields that you use, only a suggestion though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with this but I think these classes should be rewritten instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with this but I think these classes should be rewritten instead.
Disagree. These classes implement the base of scrollable list views. I don't see how they need to be rewritten.
Fixes #107