private void TargetThicknessList_SelectionChanged(object sender, SelectionChangedEventArgs e) { selectedThicknessTarget = (ThicknessTarget)targetThicknessList.SelectedIndex; switch (selectedThicknessTarget) { case ThicknessTarget.Line: ThicknessSlider.Value = Settings.PlotVisualParams.LineStrokeThickness; break; case ThicknessTarget.Vector: ThicknessSlider.Value = Settings.PlotVisualParams.ArrowStokeThickness; break; case ThicknessTarget.BorderStroke: ThicknessSlider.Value = Settings.PlotVisualParams.BorderStrokeThickness; break; } RSlider.Focus(); }
private void TargetList_SelectionChanged(object sender, SelectionChangedEventArgs e) { selectedColorTarget = (ColorTarget)targetList.SelectedIndex; switch (selectedColorTarget) { case ColorTarget.Line: R = Settings.PlotVisualParams.LineColor.R; G = Settings.PlotVisualParams.LineColor.G; B = Settings.PlotVisualParams.LineColor.B; break; case ColorTarget.Vector: R = Settings.PlotVisualParams.ArrowColor.R; G = Settings.PlotVisualParams.ArrowColor.G; B = Settings.PlotVisualParams.ArrowColor.B; break; case ColorTarget.BorderFill: R = Settings.PlotVisualParams.BorderFillColor.R; G = Settings.PlotVisualParams.BorderFillColor.G; B = Settings.PlotVisualParams.BorderFillColor.B; break; case ColorTarget.BorderStroke: R = Settings.PlotVisualParams.BorderStrokeColor.R; G = Settings.PlotVisualParams.BorderStrokeColor.G; B = Settings.PlotVisualParams.BorderStrokeColor.B; break; } SetColorSliderValue(); RSlider.Focus(); }
public OptionsPage() { FSprite bg = new FSprite("Futile_White"); bg.width = Futile.screen.width; bg.height = Futile.screen.height; bg.color = Color.gray; bg.x = Futile.screen.width / 2; bg.y = Futile.screen.height / 2; AddChild(bg); // Labels moonwalkLabel = new FLabel("font","Moon walk"); lefthandedLabel = new FLabel("font","Left handed controls"); screenshakeLabel = new FLabel("font","Screenshake intensity"); controlsScale = new FLabel("font", "Controls scale"); moonwalkLabel.alignment = FLabelAlignment.Left; lefthandedLabel.alignment = FLabelAlignment.Left; screenshakeLabel.alignment = FLabelAlignment.Left; controlsScale.alignment = FLabelAlignment.Left; SaveAndReturn = new FButton("Futile_White", "Futile_White"); SaveAndReturn.SignalRelease += SaveAndReturnSignal; // Buttons and probs the slider for screenshake? moonwalkButton = new FButton("radioOn"); moonwalkButton.expansionAmount = 40f; if(GameConfig.isMoonWalkingActive) moonwalkButton.SetElements("radioOn", "radioOn", "radioOn"); else moonwalkButton.SetElements("radioOff", "radioOff", "radioOff"); moonwalkButton.SignalRelease += HandleMoonWalkButton; lefthandedButton = new FButton("radioOn"); lefthandedButton.expansionAmount = 40f; if(GameConfig.isLeftHandedActive) lefthandedButton.SetElements("radioOn", "radioOn","radioOn"); else lefthandedButton.SetElements("radioOff", "radioOff", "radioOff"); lefthandedButton.SignalRelease += HandleLeftiesButton; shakeSlider = new RSlider("sliderBar", "sliderIndicator", GameConfig.screenShakeIntensity); scaleSlider = new RSlider("sliderBar", "sliderIndicator", GameConfig.virtualControlsSize); }