class sampleUIAnchorController extends inkLogicController
{
	editable var rectangleAnchor : inkRectangleRef;

	protected event OnInitialize()
	{
		RegisterToCallback( 'OnRelease', this, 'onButtonRelease' );
	}

	public function onButtonRelease( e : inkPointerEvent )
	{
		var buttonController : sampleUIAnchorButton;
		if( e.IsAction( 'click' ) )
		{
			buttonController = ( ( sampleUIAnchorButton )( e.GetTarget().GetController() ) );
			inkRectangleRef.SetAnchor( rectangleAnchor, buttonController.anchorLocation );
		}
	}

}

