protected override void OnDeviceTypeChanged(UIDeviceType dt) { base.OnDeviceTypeChanged(dt); if (this.deviceType == dt) { return; } this.deviceType = dt; this.UpdateUI(); }
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; } } }
protected virtual void OnDeviceTypeChanged(UIDeviceType dt) { }
private void DebugDeviceTypeChanged(UIDeviceType dt) { this.deviceType = dt; }