[bug] mouse wheel scroll on Slider reversed?

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

wally
Just popping in
Just popping in
Posts: 20
Joined: Wed Jul 09, 2008 09:45
Location: Canberra, Australia

[bug] mouse wheel scroll on Slider reversed?

Postby wally » Fri Oct 24, 2008 00:22

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

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sun Oct 26, 2008 10:31

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 :P

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.

wally
Just popping in
Just popping in
Posts: 20
Joined: Wed Jul 09, 2008 09:45
Location: Canberra, Australia

Postby wally » Sun Oct 26, 2008 22:23

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.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Wed Oct 29, 2008 09:24

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 14 guests