move camera with scroller
Posted: Mon Oct 24, 2005 12:07
It appears in demo 4, I am trying to copy it in my project. the scrollbar is made, but the problem is asociate it the event. I copy the method to move the camera horizontally
but dont run I dont undertand how asociatte event to scroller, slicer, etc... Could somebody help me?
Code: Select all
/*************************************************************************
Method that moves the camera horizontally
*************************************************************************/
bool CEGUIOgre_FrameListener::horzMoveHandler(const CEGUI::EventArgs& e)
{
using namespace CEGUI;
static float lastPos = 0;
Scrollbar* sb = (Scrollbar*)((const WindowEventArgs&)e).window;
mRotY = 0;
mRotX = sb->getScrollPosition() - lastPos;
lastPos = sb->getScrollPosition();
moveCamera();
return true;
}
but dont run I dont undertand how asociatte event to scroller, slicer, etc... Could somebody help me?