예제 #1
0
        public GhostRolesEntry(string name, string description, IEnumerable <GhostRoleInfo> roles)
        {
            RobustXamlLoader.Load(this);

            Title.Text = name;
            Description.SetMessage(description);

            foreach (var role in roles)
            {
                var button = new GhostRoleEntryButtons();
                button.RequestButton.OnPressed += _ => OnRoleSelected?.Invoke(role);
                button.FollowButton.OnPressed  += _ => OnRoleFollow?.Invoke(role);

                Buttons.AddChild(button);
            }
        }