Exemplo n.º 1
0
        private void CreateLeaderBoardsAndAchievementsPanel()
        {
            // Show Leaderboards
            var leaderboards = new Button()
            {
                Width           = _buttonWidth,
                Height          = _buttonHeight,
                Text            = "Show all leaderboards",
                Foreground      = _foregroundButton,
                BackgroundColor = _backgroundColor,
            };

            leaderboards.Click += (s, e) => { _socialService.ShowAllLeaderboards(); };

            // Show Achievements
            var achievements = new Button()
            {
                Width           = _buttonWidth,
                Height          = _buttonHeight,
                Text            = "Show all achievements",
                Foreground      = _foregroundButton,
                BackgroundColor = _backgroundColor,
                Margin          = new Thickness(_spaceControl, 0, 0, 0)
            };

            achievements.Click += (s, e) => { _socialService.ShowAchievements(); };

            var sp2 = new StackPanel
            {
                Orientation = Orientation.Horizontal,
                Margin      = new Thickness(_leftMargin, _topMargin, 0, 0),
            };

            sp2.Add(leaderboards);
            sp2.Add(achievements);

            EntityManager.Add(sp2);
        }