I've recently added an instance of the Slider class to my layout.
(The vertical slider, from Taharez lnf)
But if my mouse is over it and I scroll with the mouse wheel, it seems to scroll the opposite way to what I expected.
If I scroll up (away from me), the slider thumb goes to the bottom (and getCurrentValue reports zero). Scrolling down moves the slider thumb to the top.
For comparison, mouse wheel scrolling works the way I expected in a MultiColumnList.
The values reported / used by the slider are in the direction I expected: max at the top, 0 at bottom.
I haven't set the widget property "ReversedDirection".
Using CEGUI 0.6.1 (SDK).
Is this a known issue?
Is there any way to fix it outside of CEGUI code for now, or to disable this particular widget from receiving mouse wheel changes?
(It must still receive other mouse input)
Thanks,
Michael
[bug] mouse wheel scroll on Slider reversed?
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Hi,
I've seen the behaviour before, though I think a while back; so either I 'got used to it' or though it was fixed. Obviously the former option is not a valid solution
It seems it's not possible to easily disable the wheel action from client code. One hack I can suggest is to subscribe to EventMouseWheel and pre-adjust the value so that when CEGUI changes it in response to the event, it's reset to it's original value (yes, that's really ugly!). Another option would be to set the step to 0, but you probably want to keep that for when the user clicks either side of the thumb
The hard coded handler is doing this:
Where 'e' is a CEGUI::MouseEventArgs.
I'll have a look at this, since the 'wrong direction' thing is obviously a bug. In the future I think we should look into allowing the client more control over the pre-defined event actions too.
CE.
I've seen the behaviour before, though I think a while back; so either I 'got used to it' or though it was fixed. Obviously the former option is not a valid solution

It seems it's not possible to easily disable the wheel action from client code. One hack I can suggest is to subscribe to EventMouseWheel and pre-adjust the value so that when CEGUI changes it in response to the event, it's reset to it's original value (yes, that's really ugly!). Another option would be to set the step to 0, but you probably want to keep that for when the user clicks either side of the thumb

The hard coded handler is doing this:
Code: Select all
setCurrentValue(d_value + d_step * -e.wheelChange);
Where 'e' is a CEGUI::MouseEventArgs.
I'll have a look at this, since the 'wrong direction' thing is obviously a bug. In the future I think we should look into allowing the client more control over the pre-defined event actions too.
CE.
Thanks for looking into it CE.
I realised the "scrolling to extremes" was actually because I was just feeding raw mouse wheel inputs into injectMouseWheelChange().
(I've only had one scrollbar until now, so I didn't have much to compare to)
I tried scaling them instead and that works much better.
The inconsistent directions for scrollbars / sliders is still a problem obviously.
I realised the "scrolling to extremes" was actually because I was just feeding raw mouse wheel inputs into injectMouseWheelChange().
(I've only had one scrollbar until now, so I didn't have much to compare to)
I tried scaling them instead and that works much better.
The inconsistent directions for scrollbars / sliders is still a problem obviously.
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
wally wrote:I realised the "scrolling to extremes" was actually because I was just feeding raw mouse wheel inputs into injectMouseWheelChange().
(I've only had one scrollbar until now, so I didn't have much to compare to)
I tried scaling them instead and that works much better.
Ah, ok. That makes sense

wally wrote:The inconsistent directions for scrollbars / sliders is still a problem obviously.
Yeah, this is definitely bug-ish.
CE
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 13 guests