コード例 #1
0
        public override IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
        {
            switch (lookup)
            {
            case OsuSkinColour colour:
                return(base.GetConfig <SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colour)));

            case OsuSkinConfiguration osuLookup:
                switch (osuLookup)
                {
                case OsuSkinConfiguration.SliderPathRadius:
                    if (hasHitCircle.Value)
                    {
                        return(SkinUtils.As <TValue>(new BindableFloat(LEGACY_CIRCLE_RADIUS)));
                    }

                    break;

                case OsuSkinConfiguration.HitCircleOverlayAboveNumber:
                    // See https://osu.ppy.sh/help/wiki/Skinning/skin.ini#%5Bgeneral%5D
                    // HitCircleOverlayAboveNumer (with typo) should still be supported for now.
                    return(base.GetConfig <OsuSkinConfiguration, TValue>(OsuSkinConfiguration.HitCircleOverlayAboveNumber) ??
                           base.GetConfig <OsuSkinConfiguration, TValue>(OsuSkinConfiguration.HitCircleOverlayAboveNumer));
                }

                break;
            }

            return(base.GetConfig <TLookup, TValue>(lookup));
        }
コード例 #2
0
            public override IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
            {
                if (lookup is CatchSkinConfiguration config)
                {
                    if (config == CatchSkinConfiguration.FlipCatcherPlate)
                    {
                        return(SkinUtils.As <TValue>(new Bindable <bool>(FlipCatcherPlate)));
                    }
                }

                return(base.GetConfig <TLookup, TValue>(lookup));
            }
コード例 #3
0
        public override IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
        {
            switch (lookup)
            {
            // Lookup skin by type and index
            case KaraokeSkinLookup skinLookup:
            {
                var config       = skinLookup.Config;
                var lookupNumber = skinLookup.Lookup;

                switch (config)
                {
                case KaraokeSkinConfiguration.LyricStyle:
                    return(SkinUtils.As <TValue>(bindableFonts[lookupNumber]));

                case KaraokeSkinConfiguration.LyricLayout:
                    return(SkinUtils.As <TValue>(bindableLayouts[lookupNumber]));

                case KaraokeSkinConfiguration.NoteStyle:
                    return(SkinUtils.As <TValue>(bindableNotes[lookupNumber]));

                case KaraokeSkinConfiguration.Singer:
                    return(SkinUtils.As <TValue>(bindableSingers[lookupNumber]));
                }

                break;
            }

            // Lookup list of name by type
            case KaraokeIndexLookup indexLookup:
                switch (indexLookup)
                {
                case KaraokeIndexLookup.Layout:
                    return(SkinUtils.As <TValue>(bindableLayoutsLookup));

                case KaraokeIndexLookup.Style:
                    return(SkinUtils.As <TValue>(bindableFontsLookup));

                case KaraokeIndexLookup.Note:
                    return(SkinUtils.As <TValue>(bindableNotesLookup));

                case KaraokeIndexLookup.Singer:
                    return(SkinUtils.As <TValue>(bindableSingersLookup));
                }

                break;
            }

            return(source.GetConfig <TLookup, TValue>(lookup));
        }
コード例 #4
0
            public IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
            {
                switch (lookup)
                {
                case OsuSkinConfiguration osuLookup:
                    if (osuLookup == OsuSkinConfiguration.CursorCentre)
                    {
                        return(SkinUtils.As <TValue>(new BindableBool()));
                    }

                    break;
                }

                return(null);
            }
コード例 #5
0
        public IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
        {
            if (!(lookup is KaraokeSkinLookup skinLookup))
            {
                throw new NotSupportedException();
            }

            var config = skinLookup.Config;

            switch (config)
            {
            case KaraokeSkinConfiguration.LyricStyle:
                return(SkinUtils.As <TValue>(BindableFont));

            case KaraokeSkinConfiguration.LyricLayout:
                return(SkinUtils.As <TValue>(BindableLayout));

            default:
                throw new NotSupportedException();
            }
        }
コード例 #6
0
        public IBindable <TValue> GetConfig <TLookup, TValue>(TLookup lookup)
        {
            switch (lookup)
            {
            case OsuSkinColour colour:
                return(source.GetConfig <SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colour)));

            case OsuSkinConfiguration osuLookup:
                switch (osuLookup)
                {
                case OsuSkinConfiguration.SliderPathRadius:
                    if (hasHitCircle.Value)
                    {
                        return(SkinUtils.As <TValue>(new BindableFloat(LEGACY_CIRCLE_RADIUS)));
                    }

                    break;
                }

                break;
            }

            return(source.GetConfig <TLookup, TValue>(lookup));
        }