Ejemplo n.º 1
0
    public void RefreshUiWidth()
    {
        UiWidth = ViewRect.rect.width;
        float Ratio = UiWidth / 500f;

        Radius.GetComponent <RectTransform>().sizeDelta       = new Vector2(200 * Ratio, 30);
        Degree.GetComponent <RectTransform>().sizeDelta       = new Vector2(200 * Ratio, 30);
        Height.GetComponent <RectTransform>().sizeDelta       = new Vector2(200 * Ratio, 30);
        Rotation.GetComponent <RectTransform>().sizeDelta     = new Vector2(200 * Ratio, 30);
        RadiusText.GetComponent <RectTransform>().sizeDelta   = new Vector2(290 * Ratio, 30);
        DegreeText.GetComponent <RectTransform>().sizeDelta   = new Vector2(290 * Ratio, 30);
        HeightText.GetComponent <RectTransform>().sizeDelta   = new Vector2(290 * Ratio, 30);
        RotationText.GetComponent <RectTransform>().sizeDelta = new Vector2(290 * Ratio, 30);
    }
Ejemplo n.º 2
0
 /// <summary>
 /// set all fields back to default
 /// </summary>
 private void DisableBox()
 {
     HeightLabel.Text    = "Height";
     WidthLable.Enabled  = false;
     WidthText.Enabled   = false;
     HeightLabel.Enabled = false;
     HeightText.Enabled  = false;
     DepthLable.Enabled  = false;
     DepthText.Enabled   = false;
     HeightText.Clear();
     WidthText.Clear();
     DepthText.Clear();
     RadiusText.Clear();
     RadiusText.Enabled  = false;
     RadiusLabel.Enabled = false;
 }