public void ResolveSettings() { highlightEnabled = modInstance.HighlightOpacity.Value != 0f; tipXPos = (RectDimensionPosition)modInstance.TipXPosition.Value; tipYPos = (RectDimensionPosition)modInstance.TipYPosition.Value; Tracker.ResolveSettings(modInstance); }
public static float GetDimensionFromSetting(float lower, float upper, float dimWidth, RectDimensionPosition setting) { switch (setting) { case RectDimensionPosition.LowerWithLowerOffset: return(lower - dimWidth); case RectDimensionPosition.LowerCenter: return(lower - dimWidth / 2); case RectDimensionPosition.LowerWithHigherOffset: return(lower); case RectDimensionPosition.CenterWithLowerOffset: return(0.5f * (lower + upper) - dimWidth); case RectDimensionPosition.Center: return(0.5f * (lower + upper) - dimWidth / 2); case RectDimensionPosition.CenterWithHigherOffset: return(0.5f * (lower + upper)); case RectDimensionPosition.HigherWithLowerOffset: return(upper - dimWidth); case RectDimensionPosition.HigherCenter: return(upper - dimWidth / 2); case RectDimensionPosition.HigherWithHigherOffset: return(upper); } return(0); }