コード例 #1
0
        private void load()
        {
            OsuSpriteText count;

            InternalChild = new FillFlowContainer
            {
                AutoSizeAxes   = Axes.Both,
                Direction      = FillDirection.Horizontal,
                LayoutDuration = transition_duration,
                Children       = new[]
                {
                    count = new OsuSpriteText
                    {
                        Font = OsuFont.GetFont(weight: FontWeight.Bold, size: text_size)
                    },
                    slash = new OsuSpriteText
                    {
                        Text = @"/",
                        Font = OsuFont.GetFont(weight: FontWeight.Light, size: text_size)
                    },
                    maxText = new OsuSpriteText
                    {
                        Font = OsuFont.GetFont(weight: FontWeight.Light, size: text_size)
                    },
                }
            };

            MaxParticipants.BindValueChanged(_ => updateMax(), true);
            ParticipantCount.BindValueChanged(c => count.Text = c.NewValue.ToString("#,0"), true);
        }
コード例 #2
0
        private void load()
        {
            OsuSpriteText count;

            InternalChild = new FillFlowContainer
            {
                AutoSizeAxes   = Axes.Both,
                Direction      = FillDirection.Horizontal,
                LayoutDuration = transition_duration,
                Children       = new[]
                {
                    count = new OsuSpriteText
                    {
                        TextSize = text_size,
                        Font     = @"Exo2.0-Bold"
                    },
                    slash = new OsuSpriteText
                    {
                        Text     = @"/",
                        TextSize = text_size,
                        Font     = @"Exo2.0-Light"
                    },
                    maxText = new OsuSpriteText
                    {
                        TextSize = text_size,
                        Font     = @"Exo2.0-Light"
                    },
                }
            };

            MaxParticipants.BindValueChanged(_ => updateMax(), true);
            ParticipantCount.BindValueChanged(v => count.Text = v.ToString("#,0"), true);
        }
コード例 #3
0
 private void load()
 {
     ParticipantCount.BindValueChanged(_ => setParticipantCount());
     MaxParticipants.BindValueChanged(_ => setParticipantCount(), true);
 }