Capture MousewheelEvent

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

maysm
Just popping in
Just popping in
Posts: 5
Joined: Mon Oct 30, 2006 15:33

Capture MousewheelEvent

Postby maysm » Mon Oct 30, 2006 18:20

:?: I want to capture the mouse wheel event on a window with scrollbar so the scrollbar position changes correspondingly.

It seems like the EventWheelChange never gets sent.
I'm bound to be missing something in the implementation.
Changing the EventWheelChange to EventMouseClick works properly. So I'm subscribing the listener correctly in the right window and the correct function is called.

If there is a post concerning this topic or any help you can spare, I would greatly appreciate direction to it.

:arrow: -Thank you to the supporters of this forum its a great help-

Scott :D

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Mon Oct 30, 2006 18:34

Are you injecting the mouse wheel in System ?

maysm
Just popping in
Just popping in
Posts: 5
Joined: Mon Oct 30, 2006 15:33

Postby maysm » Mon Oct 30, 2006 18:44

Thats what I need to do! Thanks.
Where is the mousewheel, I see scrolls and right, left and middle click?

-Scott

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Mon Oct 30, 2006 18:50

The API reference is your friend :) Values of +-1.0 work well for normal stepped wheels.

maysm
Just popping in
Just popping in
Posts: 5
Joined: Mon Oct 30, 2006 15:33

Postby maysm » Mon Oct 30, 2006 22:11

Any Idea why
osgGA::GUIEventAdapter::MouseYOrientation value is always Y_INCREASING_UPWARDS.

After using:
CEGUI::System::getSingleton().injectMouseWheelChange(1);

I would like the MouseOrientation to clear or something such that its not always Y_INCREASING_UPWARDS.

Any idea what to change this value to and/or how to clear or change state of this?

-Thats for your time,

-Scott

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Mon Oct 30, 2006 23:54

I dont know osg

maysm
Just popping in
Just popping in
Posts: 5
Joined: Mon Oct 30, 2006 15:33

WheelChange

Postby maysm » Tue Oct 31, 2006 15:09

Last thing,

by injectiMouseWheelChange(1)
will that make wheelChange = wheelChange +1 ?
So far it seems to have no effect.
I debugged and It is running the inject code.

-Thanks :o
Scott

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Tue Oct 31, 2006 15:13

CEGUI does not think of the wheel as having an absolute position. only the relative movement is interesting. injecting +1 while hovering the mouse over a scrolled listbox should scroll the listbox!

maysm
Just popping in
Just popping in
Posts: 5
Joined: Mon Oct 30, 2006 15:33

Postby maysm » Wed Nov 01, 2006 13:44

Will it also scroll a scrollbar that has been added to a window or should the window be a scrollpane?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Postby lindquist » Wed Nov 01, 2006 14:59

It will not scroll automagically. You have to do it yourself by handling the scroll event and repositioning the scrollbar IIRC.

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

Postby CrazyEddie » Wed Nov 01, 2006 18:30

Yeah, that's right. Having just read that here, my first thought was "that's kind of lame" - I think maybe adding a setting to enable auto-scrolling via the wheel would be a good addition :)

CE.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 18 guests