public ScrollView GetGameLayout(GameNode game) { var scrollView = new ScrollView(this); var layout = new LinearLayout(this); layout.Orientation = Orientation.Vertical; var aLabel = new TextView(this); aLabel.Text = game.Title; layout.AddView(aLabel); foreach (var character in game.Characters) { var button = new Button(this); button.Text = character.Title; button.Click += (sender, e) => { SetContentView(GetCharacterLayout(character)); }; layout.AddView(button); } var createButton = new Button(this); createButton.Text = "Add new Player/Character"; createButton.Click += (sender, e) => { SetContentView(GetAddNewLayout(MenuItemType.PlayerCharacter, game)); }; layout.AddView(createButton); var backButton = new Button(this); backButton.Text = "Back"; backButton.Click += (sender, e) => { SetContentView(GetHomeLayout()); }; layout.AddView(backButton); scrollView.AddView(layout); return scrollView; }
public PlayerCharacterNode(string pTitle, GameNode parent) { this.Title = pTitle; this.Parent = parent; Opponents = new List<OpponentMatchupNode>(); }