stride3d / stride3d/stride

can't scroll ScrollView of buttons (with mouse)

Open
#715 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Graphics bug
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Release Type: Release
Version: v4.0.0.1 beta2 0928
Platform(s): Windows

Describe the bug
I made a ScrollView of a grid of buttons. I can't scroll it with the mouse on windows. There appear to be a related set of problems:

  • there is no visible scrollbar to grab or touch with a mouse
  • mouse scroll-wheel doesn't work (there are no routed mouse events or scroll wheel events in the Stride UI kit)
  • "touch drag" doesn't work. this might be because the scrollview is entirely filled with buttons. Trying to drag briefly shows scrollbar then immediately clicks a button. Normally when using touch-drag model, one still needs to be able to "drag" an active element like a button without clicking it. (this might be a bug on mobile as well)

To Reproduce
Steps to reproduce the behavior:

  1. Check out https://github.com/jeske/StrideCodeSamples and run DynamicScrollingButtonList
  2. try to scroll the button grid by grab-dragging it... witness it doesn't scroll
  3. use mouse-wheel, witness it doesn't scroll

Expected behavior
Expected there would be some way to scroll a scrollviewer on windows, including mousewheel.

The two things that I am looking into are:

  • The UI controls don't have any "routed" mouse events, or any "mouse scroll wheel" propagation that I can see.. so adding that seems like it would be helpful
  • I'm investigating if the touch-drag-scroll is erronously preventing one from dragging on active elements like buttons, in which case I'll try to make some code adjustments.

Screenshots

You can see a video of it happening here:

Here is a screenshot, with the grid of buttons on the left. There are 50 buttons in the list, and it should be scrollable, but it's not.

image

There might be another bug visible in this project:

  • the "red" UI canvas has weird bounds, if you resize the window, you'll see that the red-alpha background stays proportioned like the original window shape, creating bars on the top and bottom if you resize the window to be tall... but the UI inside it stays pinned to the lower left corner. I expect the entire red box to stay pinned to the lower left corner and be sized according to the init

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the DynamicScrollingButtonList sample from StrideCodeSamples on Windows and reproduce the ScrollView behavior with mouse dragging and the wheel. Inspect the ScrollView and UI button input handling, including touch-drag behavior; done means a grid of buttons can be scrolled with an available scrollbar, mouse wheel, or drag without activating a button accidentally.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop-dev, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.