Bug in ScrollBar element

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REAPER
Posts: 8
Joined: Sat May 08, 2004 10:52 pm
Location: Russia, Moscow

Bug in ScrollBar element

Post by REAPER »

CGUIScrollBar element doesn't post an event that scroll pos has been changed when you use mouse wheel.

Code: Select all

case EMIE_MOUSE_WHEEL:
    setPos(getPos() + (s32)event.MouseInput.Wheel*-10);
    return true;
must be

Code: Select all

case EMIE_MOUSE_WHEEL:
     setPos(getPos() + (s32)event.MouseInput.Wheel*-10);
     SEvent event;
     event.EventType = EET_GUI_EVENT;
     event.GUIEvent.Caller = this;
     event.GUIEvent.EventType = EGET_SCROLL_BAR_CHANGED;
     Parent->OnEvent(event);
     return true;
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Thanks, updated in next version. :)
Post Reply