Ejemplo n.º 1
0
 protected override void OnDeviceTypeChanged(UIDeviceType dt)
 {
     base.OnDeviceTypeChanged(dt);
     if (this.deviceType == dt)
     {
         return;
     }
     this.deviceType = dt;
     this.UpdateUI();
 }
Ejemplo n.º 2
0
        public override void EditorSave()
        {
            base.EditorSave();
            UIDeviceType deviceType = UILayoutManager.DeviceType;

            if (deviceType != UIDeviceType.Phone)
            {
                if (deviceType == UIDeviceType.Tablet)
                {
                    switch (UILayoutManager.Orientation)
                    {
                    case UIDeviceOrientation.Portrait:
                    case UIDeviceOrientation.PortraitUpsideDown:
                        if (this.tabletPortrait == null)
                        {
                            this.tabletPortrait = new UIFontData();
                        }
                        this.tabletPortrait = UIFontData.FromTransform(base.transform);
                        break;

                    case UIDeviceOrientation.LandscapeRight:
                    case UIDeviceOrientation.LandscapeLeft:
                        if (this.tabletLandscape == null)
                        {
                            this.tabletLandscape = new UIFontData();
                        }
                        this.tabletLandscape = UIFontData.FromTransform(base.transform);
                        break;
                    }
                }
            }
            else
            {
                switch (UILayoutManager.Orientation)
                {
                case UIDeviceOrientation.Portrait:
                case UIDeviceOrientation.PortraitUpsideDown:
                    if (this.phonePortrait == null)
                    {
                        this.phonePortrait = new UIFontData();
                    }
                    this.phonePortrait = UIFontData.FromTransform(base.transform);
                    break;

                case UIDeviceOrientation.LandscapeRight:
                case UIDeviceOrientation.LandscapeLeft:
                    if (this.phoneLandscape == null)
                    {
                        this.phoneLandscape = new UIFontData();
                    }
                    this.phoneLandscape = UIFontData.FromTransform(base.transform);
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 protected virtual void OnDeviceTypeChanged(UIDeviceType dt)
 {
 }
Ejemplo n.º 4
0
 private void DebugDeviceTypeChanged(UIDeviceType dt)
 {
     this.deviceType = dt;
 }