Ejemplo n.º 1
0
        private void load(GamebosuConfigManager config)
        {
            Rate.BindValueChanged(updateValue, true);

            lockClockRate = config?.GetBindable <bool>(GamebosuSetting.LockClockRate);
            lockClockRate?.BindValueChanged(e => State.Value = e.NewValue ? Visibility.Hidden : Visibility.Visible, true);
        }
Ejemplo n.º 2
0
        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();
        }