public TestSceneClockRateIndicator() { Child = indic = new ClockRateIndicator { Anchor = Framework.Graphics.Anchor.BottomCentre, Origin = Framework.Graphics.Anchor.BottomCentre, Margin = new Framework.Graphics.MarginPadding { Bottom = 20 } }; indic.Rate.BindTo(val); AddStep("show", () => indic.Show()); AddSliderStep("slider", 0.0, 10.0, 5.0, t => val.Value = t); }
private void load(GamebosuConfigManager config) { Children = new Drawable[] { container = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Child = gameboy = new DrawableGameboy(cartridge) { Anchor = Anchor.Centre, Origin = Anchor.Centre, }, }, new ClockRateIndicatorControlReceptor { AdjustAction = (f) => indicator.AdjustRate(f), }, indicator = new ClockRateIndicator { Anchor = Anchor.BottomCentre, Origin = Anchor.BottomCentre, Margin = new MarginPadding { Bottom = 20 }, Alpha = 0, } }; gameboyScale = config.GetBindable <float>(GamebosuSetting.GameboyScale); gameboyScale.BindValueChanged(e => container.ScaleTo(e.NewValue, 400, Easing.OutQuint), true); config.BindWith(GamebosuSetting.ClockRate, indicator.Rate); gameboy.Start(); }