|
|
|
@ -1031,6 +1031,7 @@ namespace NLGUI
|
|
|
|
|
_OldCaptureKeyboard = NULL;
|
|
|
|
|
setCapturePointerLeft(NULL);
|
|
|
|
|
setCapturePointerRight(NULL);
|
|
|
|
|
_CapturedView = NULL;
|
|
|
|
|
|
|
|
|
|
resetColorProps();
|
|
|
|
|
|
|
|
|
@ -2086,6 +2087,12 @@ namespace NLGUI
|
|
|
|
|
getCapturePointerRight()->handleEvent( evnt );
|
|
|
|
|
setCapturePointerRight( NULL );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( _CapturedView != NULL )
|
|
|
|
|
{
|
|
|
|
|
_CapturedView->handleEvent( evnt );
|
|
|
|
|
_CapturedView = NULL;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2249,6 +2256,9 @@ namespace NLGUI
|
|
|
|
|
getCapturePointerLeft() != getCapturePointerRight() )
|
|
|
|
|
handled|= getCapturePointerRight()->handleEvent(evnt);
|
|
|
|
|
|
|
|
|
|
if( _CapturedView != NULL )
|
|
|
|
|
_CapturedView->handleEvent( evnt );
|
|
|
|
|
|
|
|
|
|
CInterfaceGroup *ptr = getWindowUnder (eventDesc.getX(), eventDesc.getY());
|
|
|
|
|
setCurrentWindowUnder( ptr );
|
|
|
|
|
|
|
|
|
@ -2326,6 +2336,8 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool captured = false;
|
|
|
|
|
|
|
|
|
|
// must not capture a new element if a sheet is currentlty being dragged.
|
|
|
|
|
// This may happen when alt-tab has been used => the sheet is dragged but the left button is up
|
|
|
|
|
if (!CCtrlDraggable::getDraggedSheet())
|
|
|
|
@ -2343,9 +2355,25 @@ namespace NLGUI
|
|
|
|
|
{
|
|
|
|
|
nMaxDepth = d;
|
|
|
|
|
setCapturePointerLeft( ctrl );
|
|
|
|
|
captured = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( CInterfaceElement::getEditorMode() && !captured )
|
|
|
|
|
{
|
|
|
|
|
for( sint32 i = _ViewsUnderPointer.size()-1; i >= 0; i-- )
|
|
|
|
|
{
|
|
|
|
|
CViewBase *v = _ViewsUnderPointer[i];
|
|
|
|
|
if( ( v != NULL ) && v->isInGroup( pNewCurrentWnd ) )
|
|
|
|
|
{
|
|
|
|
|
_CapturedView = v;
|
|
|
|
|
captured = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
notifyElementCaptured( getCapturePointerLeft() );
|
|
|
|
|
if (clickedOutModalWindow && !clickedOutModalWindow->OnPostClickOut.empty())
|
|
|
|
|
{
|
|
|
|
@ -2353,13 +2381,16 @@ namespace NLGUI
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//if found
|
|
|
|
|
if ( getCapturePointerLeft() != NULL)
|
|
|
|
|
if ( captured )
|
|
|
|
|
{
|
|
|
|
|
// consider clicking on a control implies handling of the event.
|
|
|
|
|
handled= true;
|
|
|
|
|
|
|
|
|
|
// handle the capture
|
|
|
|
|
getCapturePointerLeft()->handleEvent(evnt);
|
|
|
|
|
if( getCapturePointerLeft() != NULL )
|
|
|
|
|
getCapturePointerLeft()->handleEvent(evnt);
|
|
|
|
|
else
|
|
|
|
|
_CapturedView->handleEvent( evnt );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2588,6 +2619,8 @@ namespace NLGUI
|
|
|
|
|
// ***************************************************************************
|
|
|
|
|
void CWidgetManager::setCapturePointerLeft(CCtrlBase *c)
|
|
|
|
|
{
|
|
|
|
|
_CapturedView = NULL;
|
|
|
|
|
|
|
|
|
|
// additionally, abort any dragging
|
|
|
|
|
if( CCtrlDraggable::getDraggedSheet() != NULL )
|
|
|
|
|
CCtrlDraggable::getDraggedSheet()->abortDragging();
|
|
|
|
|