public ListenForMouse ( |
||
region | ||
callback | UIMouseEvent | |
return |
public UIMouseEventRef ListenForMouse(Rectangle region, UIMouseEvent callback)
{
var newRegion = new UIMouseEventRef()
{
Callback = callback,
Region = region,
Element = this
};
if (m_MouseRefs == null)
{
m_MouseRefs = new List<UIMouseEventRef>();
}
m_MouseRefs.Add(newRegion);
return newRegion;
}
public UIDragHandler(UIElement mouseTarget, UIElement dragControl) { UpdateHook = new UpdateHookDelegate(Update); MouseTarget = mouseTarget; DragControl = dragControl; MouseEvent = mouseTarget.ListenForMouse(mouseTarget.GetBounds(), new UIMouseEvent(DragMouseEvents)); }