/// <summary> /// Can / is the interactable selected by the mouse? /// </summary> public bool IsSelected_ByMouse(IInteractable interactable) { if (ms_selectedInteractable == interactable) { //It was selected from the start. return(true); } else { Vector2 mousePos = ms_lastPosition.ToVector2(); // Because elements can move, resolutions can change etc., we want to know if the // given interactable is still "selected" (we don't know if it is or not). return(interactable.Visable && interactable.Contains(mousePos)); } }