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