public float GetValue(AdaptiveRect referrenceGUI) { float ret = 0; switch (adaptivePointMode) { case AdaptivePointMode.RelativeToScreenLeft: return(Screen.width * Aspect); case AdaptivePointMode.RelativeToScreenTop: return(Screen.height * Aspect); case AdaptivePointMode.RelativeToReferrenceButtonTop: return(referrenceGUI.GetAnchor().y + this.RelativeReferrenceLength.GetValue(referrenceGUI.GetSize())); break; case AdaptivePointMode.RelativeToReferrenceButtonLeft: return(referrenceGUI.GetAnchor().x + this.RelativeReferrenceLength.GetValue(referrenceGUI.GetSize())); break; case AdaptivePointMode.Fixed: default: return(FixedValue); } return(ret); }
public float GetValue(AdaptiveRect referrenceGUI) { float ret = 0; switch (adaptivePointMode) { case AdaptivePointMode.RelativeToScreenLeft: return Screen.width * Aspect; case AdaptivePointMode.RelativeToScreenTop: return Screen.height * Aspect; case AdaptivePointMode.RelativeToReferrenceButtonTop: return referrenceGUI.GetAnchor().y + this.RelativeReferrenceLength.GetValue(referrenceGUI.GetSize()); break; case AdaptivePointMode.RelativeToReferrenceButtonLeft: return referrenceGUI.GetAnchor().x + this.RelativeReferrenceLength.GetValue(referrenceGUI.GetSize()); break; case AdaptivePointMode.Fixed: default: return FixedValue; } return ret; }