コード例 #1
0
            protected override void LoadComplete()
            {
                base.LoadComplete();

                CurrentBeatmap.BindValueChanged(setBeatmap, true);
                CurrentRuleset.BindValueChanged(setRuleset, true);
            }
コード例 #2
0
        private void load()
        {
            Container gameTypeContainer;

            InternalChild = new FillFlowContainer
            {
                AutoSizeAxes   = Axes.Both,
                Direction      = FillDirection.Horizontal,
                Spacing        = new Vector2(5f, 0f),
                LayoutDuration = 100,
                Children       = new[]
                {
                    rulesetContainer = new Container
                    {
                        AutoSizeAxes = Axes.Both,
                    },
                    gameTypeContainer = new Container
                    {
                        AutoSizeAxes = Axes.Both,
                    },
                },
            };

            CurrentBeatmap.BindValueChanged(_ => updateBeatmap());
            CurrentRuleset.BindValueChanged(_ => updateBeatmap(), true);
            Type.BindValueChanged(v => gameTypeContainer.Child = new DrawableGameType(v)
            {
                Size = new Vector2(height)
            }, true);
        }
コード例 #3
0
ファイル: BeatmapTypeInfo.cs プロジェクト: ry00001/osu
        private void load()
        {
            LinkFlowContainer beatmapAuthor;

            InternalChild = new FillFlowContainer
            {
                AutoSizeAxes   = Axes.Both,
                Direction      = FillDirection.Horizontal,
                LayoutDuration = 100,
                Spacing        = new Vector2(5, 0),
                Children       = new Drawable[]
                {
                    new ModeTypeInfo(),
                    new Container
                    {
                        AutoSizeAxes = Axes.X,
                        Height       = 30,
                        Margin       = new MarginPadding {
                            Left = 5
                        },
                        Children = new Drawable[]
                        {
                            new BeatmapTitle(),
                            beatmapAuthor = new LinkFlowContainer(s => s.TextSize = 14)
                            {
                                Anchor       = Anchor.BottomLeft,
                                Origin       = Anchor.BottomLeft,
                                AutoSizeAxes = Axes.Both
                            },
                        },
                    },
                }
            };

            CurrentBeatmap.BindValueChanged(v =>
            {
                beatmapAuthor.Clear();

                if (v != null)
                {
                    beatmapAuthor.AddText("mapped by ", s => s.Colour = OsuColour.Gray(0.8f));
                    beatmapAuthor.AddLink(v.Metadata.Author.Username, null, LinkAction.OpenUserProfile, v.Metadata.Author.Id.ToString(), "View Profile");
                }
            }, true);
        }
コード例 #4
0
 private void load()
 {
     CurrentBeatmap.BindValueChanged(v => updateText(), true);
 }