コード例 #1
0
 public DiffdelController(Config config, PlatformLeaderboardViewController platformLeaderboardViewController, StandardLevelDetailViewController standardLevelDetailViewController)
 {
     _config = config;
     _platformLeaderboardViewController = platformLeaderboardViewController;
     _standardLevelDetailView           = Accessors.LevelDetailView(ref standardLevelDetailViewController) !;
     _buttonText = (Accessors.NPSText(ref Accessors.ParamsPanel(ref _standardLevelDetailView)) as ButtonText) !;
     _beatmapCharacteristicSegmentedControlController = (Accessors.CharacteristicSegment(ref _standardLevelDetailView)) !;
     _diffdelDifficultyControlController = (Accessors.DifficultySegment(ref _standardLevelDetailView) as DiffdelDifficultyControlController) !;
 }
コード例 #2
0
        public Plugin(Conf conf, IPALogger logger, Zenjector zenjector)
        {
            Log = logger;
            var config = conf.Generated <Config>();

            zenjector
            .On <MenuInstaller>()
            .Pseudo((Container) =>
            {
                Container.BindInstance(config);
                Container.BindInterfacesTo <DiffdelController>().AsSingle();
            })
            .Mutate <StandardLevelDetailViewController>((ctx, levelDetailViewController) =>
            {
                var levelDetail = Accessors.LevelDetailView(ref levelDetailViewController);
                var levelParams = Accessors.ParamsPanel(ref levelDetail);
                Accessors.NPSText(ref levelParams)           = Accessors.NPSText(ref levelParams).Upgrade <TextMeshProUGUI, ButtonText>();
                Accessors.DifficultySegment(ref levelDetail) = Accessors.DifficultySegment(ref levelDetail).Upgrade <BeatmapDifficultySegmentedControlController, DiffdelDifficultyControlController>();
            });
        }