forked from shpaass/yafc-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PageSearch scrollbar (shpaass#176)
`gui.SetTextInputFocus` was setting `gui.mouseDownRect`, which is heavily used by scrollbars to detect is the mouse is still inside the scrollbar rect when dragging. Since the `PageSearch` focus gets updated every (build) event, the `mouseDownRect` was effectively always set to the search input, and the scrollbar could not be dragged as it detected that the mouse was not in the correct `Rect` anymore. I fixes the issue by introducing a `gui.focusRect`, so these `Rect`s are tracked independently. Both typing text, as well as dragging the `PageSearch` scrollbar seem to be working now. I (quickly) checked some other input fields, but did not see any regressions. (The other commit is a small cleanup that I encountered while debugging this issue) Fixes shpaass#168
- Loading branch information
Showing
4 changed files
with
5 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters