private void updateCameraFOV(float percentage, bool tween = false) { float num = 30f; float num2 = 90f; AspectRatioType aspectRatioType = PlatformUtils.GetAspectRatioType(); for (int i = 0; i < ZoomSettings.Length; i++) { if (aspectRatioType == ZoomSettings[i].Type) { num = ZoomSettings[i].MinFOV; num2 = ZoomSettings[i].MaxFOV; break; } } float num3 = num2 - num; float value = num + num3 * percentage; value = Mathf.Clamp(value, num, num2); if (tween) { TweenFOV(value); } else { myCamera.fieldOfView = value; } }
public Button(NinePatchRegion2D releasedTexture, NinePatchRegion2D hoverTexture, NinePatchRegion2D pressedTexture, Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, float aspectRatio, AspectRatioType aspectRatioType) : base(origin, percentX, pOffsetX, percentY, pOffsetY, percentAspect, pOffsetAspect, aspectRatio, aspectRatioType) { _releasedTexture = releasedTexture; _hoverTexture = hoverTexture; _pressedTexture = pressedTexture; _bounds = new Vector2(releasedTexture.Width, releasedTexture.Height); SubPanel = new Panel(Origin.TopLeft, 0, 0, 0, 0, 1, 0, 1, (float)0) { Parent = this }; }
public Widget(Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, float aspectRatio, AspectRatioType aspectRatioType) { Origin = origin; PercentX = percentX; PercentY = percentY; POffsetX = pOffsetX; POffsetY = pOffsetY; PercentWidth = percentAspect; POffsetWidth = pOffsetAspect; PercentHeight = percentAspect; POffsetHeight = pOffsetAspect; AspectRatio = aspectRatio; AspectRatioType = aspectRatioType; }
public Image(int x, int y, int width, int height, string filename, Colors colorDiffuse, AspectRatioType aspectRatio = AspectRatioType.Stretch) : base() { _aspectRatio = aspectRatio; _colorDiffuse = colorDiffuse; // Utils.Call(_name + " = xbmcgui.ControlImage(" + x + "," + y + "," + width + "," + height + ",'" + filename + "'," + Colors.ToParam("colorDiffuse", _colorDiffuse) + " aspectRatio = " + (int)_aspectRatio + ")"); }
public MainPage() { this.InitializeComponent(); currentRatio = AspectRatioType.ratio_4_3; selectedBrush = new SolidColorBrush(Windows.UI.Colors.CadetBlue); unselectedBrush = new SolidColorBrush(Windows.UI.Colors.DarkGray); updateButtons(); updateRightText(); }
public Panel(Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, float aspectRatio, AspectRatioType aspectRatioType) : base(origin, percentX, pOffsetX, percentY, pOffsetY, percentAspect, pOffsetAspect, aspectRatio, aspectRatioType) { }
private static T getAspectRatioSettingsForType <T>(T[] settings, AspectRatioType aspectRatioType) where T : AbstractAspectRatioSpecificSettings { if (settings != null) { for (int i = 0; i < settings.Length; i++) { if (settings[i].SettingsType == aspectRatioType) { return(settings[i]); } } } return(null); }
public Label(BitmapFont font, Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, AspectRatioType aspectRatioType) : base(origin, percentX, pOffsetX, percentY, pOffsetY, percentAspect, pOffsetAspect, 0, aspectRatioType) { _font = font; }
public NinePatchImage(NinePatchRegion2D ninePatch, Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, float aspectRatio, AspectRatioType aspectRatioType) : base(origin, percentX, pOffsetX, percentY, pOffsetY, percentAspect, pOffsetAspect, aspectRatio, aspectRatioType) { _ninePatch = ninePatch; }
public Image(Texture2D texture, Origin origin, float percentX, float pOffsetX, float percentY, float pOffsetY, float percentAspect, float pOffsetAspect, float aspectRatio, AspectRatioType aspectRatioType) : base(origin, percentX, pOffsetX, percentY, pOffsetY, percentAspect, pOffsetAspect, aspectRatio, aspectRatioType) { _texture = texture; _bounds = new Vector2(_texture.Width, _texture.Height); }
private void onClick(object sender, Windows.UI.Xaml.RoutedEventArgs e) { if (sender == this.ratio_4_3) { currentRatio = AspectRatioType.ratio_4_3; } else if (sender == this.ratio_16_9) { currentRatio = AspectRatioType.ratio_16_9; } else if (sender == this.ratio_16_10) { currentRatio = AspectRatioType.ratio_16_10; } updateButtons(); updateRightText(); }
private void mitemAspectRatioStretch_Checked(object sender, RoutedEventArgs e) { aspectRatio = AspectRatioType.Stretch; UpdateAspectRatio(); }
private void mitemAspectRatioOriginal_Checked(object sender, RoutedEventArgs e) { aspectRatio = AspectRatioType.Original; UpdateAspectRatio(); }
private void mitemAspectRatioClip_Checked(object sender, RoutedEventArgs e) { aspectRatio = AspectRatioType.Clip; UpdateAspectRatio(); }
public MainWindow() { InitializeComponent(); CreateDXPlayer(); GlobalEnv.ReadConfiguration(); sliderTimeline.Value = 0; sliderTimeline.IsEnabled = false; ShowPlayTime(0.0); sliderVolume.Minimum = 0; sliderVolume.Maximum = 0xFFFF; sliderVolume.Value = GlobalEnv.audioVolume; isWindowToVideoSize = GlobalEnv.isWindowToVideoSize == 0 ? false : true; IsRecording = null; scaleMode = (ScaleMode)GlobalEnv.scale_mode; aspectRatio = (AspectRatioType)GlobalEnv.aspect_ratio; Left = GlobalEnv.windowLocation.Left; Top = GlobalEnv.windowLocation.Top; gridMain.Width = GlobalEnv.windowLocation.Width; gridMain.Height = GlobalEnv.windowLocation.Height; SizeToContent = System.Windows.SizeToContent.WidthAndHeight; State = PLAYER_STATE.STATE_STOPPED; EventManager.RegisterClassHandler(typeof(Control), Control.PreviewKeyDownEvent, new KeyEventHandler(winMain_KeyDown)); EventManager.RegisterClassHandler(typeof(Control), Control.PreviewMouseWheelEvent, new MouseWheelEventHandler(winMain_MouseWheel)); }
public Image(int x, int y, int width, int height, string filename, AspectRatioType aspectRatio = AspectRatioType.Stretch) : this(x, y, width, height, filename, Colors.None, aspectRatio) { }
public Image(int x, int y, int width, int height, Colors color, Colors colorDiffuse, AspectRatioType aspectRatio = AspectRatioType.Stretch) : this(x, y, width, height, color.Texture, colorDiffuse, aspectRatio) { }
public static TSettings GetAspectRatioSettingsForType <TSettings, TSettingsComponent, TComponent>(TSettingsComponent component, AspectRatioType aspectRatioType) where TSettings : AbstractAspectRatioSpecificSettings where TSettingsComponent : AspectRatioSpecificSettingsComponent <TComponent, TSettings> where TComponent : Component { TSettings[] runtimeSettings = component.runtimeSettings; return(getAspectRatioSettingsForType(runtimeSettings, aspectRatioType)); }
public SkinnedImage(string filename, AspectRatioType aspectRatio = AspectRatioType.Stretch) : this(filename, Colors.None, aspectRatio : aspectRatio) { }
public static T FindAspectRatioSettings <T>(T[] settings) where T : AbstractAspectRatioSpecificSettings { AspectRatioType aspectRatioType = GetAspectRatioType(); return(getAspectRatioSettingsForType(settings, aspectRatioType)); }
public SkinnedImage(string filename, Colors colorDiffuse, AspectRatioType aspectRatio = AspectRatioType.Stretch) : base(-10, -10, 1, 1, filename, colorDiffuse, aspectRatio: aspectRatio) { }