public virtual void SetBounds(float?x, float?z, float?width = null, float?height = null) { float parentX = Parent == null ? 0 : Parent.Absolute_X; float parentz = Parent == null ? 0 : Parent.Absolute_Y; if (x.HasValue) { location.X = Scale.hPosScale(x.Value) - parentX; } if (z.HasValue) { location.Y = Scale.vPosScale(z.Value) - parentz; } if (width.HasValue) { size.X = Scale.hSizeScale(width.Value); } if (height.HasValue) { size.Y = Scale.vSizeScale(height.Value); } Singleton <GUI> .INSTANCE.Dirty = true; }
public static float ScaleVertical(this float value) { return(Scale.vPosScale(value)); }