i have a problem.. @ moment i work on a terraineditor ... with CEGUI ... and Ogre
No my Problem... when i click into the Menu ... also an CEGUI window .. in the background the dorming goes away..
how can i say my code...
if on_cegui_window then no deform ??
this are my codes...
Code: Select all
void Deform ()// Code for Deforming the Terrain
{
const OIS::MouseState state = mMouse->getMouseState();
CEGUI::System::getSingleton().injectMousePosition(state.X.abs,state.Y.abs);
CEGUI::Point mousePos = CEGUI::MouseCursor::getSingleton().getPosition();
Ray ray = mCamera->getCameraToViewportRay(mousePos.d_x/float(state.width),mousePos.d_y/float(state.height));
................
and for mouse Down
Code: Select all
if (mLMouseDown)
{
Deform ();
bDeforming = true;
}
and now my mousereleaseCode
Code: Select all
bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id)
{
CEGUI::System::getSingleton().injectMouseButtonDown(convertButton(id));
if (id == OIS::MB_Left)
{
mLMouseDown = true;
} // if
// Right mouse button down
else if (id == OIS::MB_Right)
{
CEGUI::MouseCursor::getSingleton().hide();
mRMouseDown = true;
} // else if
return true;
}
Thanks for Help to all