private void SendHoverMessages(DropContainer oldHover) { // if both are null nothing happes, if one if not null, we ether enter a new one, leave the current one or both if (_currentHoveredContainer != oldHover) { if (_currentHoveredContainer != null) // we enter a new hover { OnStartHovering(_dragInfo, _dropInfo); _currentHoveredContainer.OnStartHover(_dragInfo, _dropInfo); } else if (oldHover != null) // we leave the current hover { OnStopHovering(_dragInfo, _dropInfo); oldHover.OnStopHover(_dragInfo, _dropInfo); } } if (_currentHoveredContainer != null) { OnHovering(_dragInfo, _dropInfo); _currentHoveredContainer.OnHover(_dragInfo, _dropInfo); } }
private void DropIntoContainer(DropContainer container) { OnStopHovering(_dragInfo, _dropInfo); container.OnStopHover(_dragInfo, _dropInfo); OnDrop(_dragInfo, _dropInfo); container.OnDrop(_dragInfo, _dropInfo); }