public PhoneMainMenuScreen()
            : base("Racing Rage")
        {
            // Create a button to start the game
            Button playButton = new Button("Play");

            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);
            playButton.Size = new Vector2(300, 100);

            BooleanButton musicButton = new BooleanButton("Music", true);

            musicButton.Tapped += musicButton_Tapped;
            MenuButtons.Add(musicButton);

            BooleanButton sfxButton = new BooleanButton("Sound", true);

            sfxButton.Tapped += sfxButton_Tapped;
            MenuButtons.Add(sfxButton);

            Button controlButton = new Button("Control: Gyro");

            controlButton.Tapped += controlButton_Tapped;
            MenuButtons.Add(controlButton);

            Button creditsButton = new Button("Credits");

            creditsButton.Tapped += creditsButton_Tapped;
            MenuButtons.Add(creditsButton);
        }
示例#2
0
        public FinishGameScreen(int score, int turns)
            : base("Complete")
        {
            Button scoreButton = new InfoButton("Score: " + score);

            MenuButtons.Add(scoreButton);

            Button turnButton = new InfoButton("Attempts: " + turns);

            MenuButtons.Add(turnButton);

            Button scoreHistoryButton = new Button("Score History");

            scoreHistoryButton.Tapped += scoreHistoryButton_Tapped;
            MenuButtons.Add(scoreHistoryButton);

            Button newGameButton = new Button("New Game");

            newGameButton.Tapped += newGameButton_Tapped;
            MenuButtons.Add(newGameButton);

            Button exitButton = new Button("Back to Menu");

            exitButton.Tapped += exitButton_Tapped;
            MenuButtons.Add(exitButton);
        }
示例#3
0
        public PhoneMainMenuScreen()
            : base("  Planetary \n  Escape")
        {
            // Create a button to start the game
            Button playButton = new Button("Enter");

            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);

            // Create two buttons to toggle
            //  effects and music. This sample just shows one way
            // of making and using these buttons; it doesn't actually have sound effects or music
            //BooleanButton sfxButton = new BooleanButton("SoundFx", ScreenManager.GetSetting("enableSoundFx", true));
            BooleanButton sfxButton = new BooleanButton("SoundFx", true);

            sfxButton.Tapped += sfxButton_Tapped;
            MenuButtons.Add(sfxButton);

            //BooleanButton musicButton = new BooleanButton("Music", ScreenManager.GetSetting("enableMusic", true));
            BooleanButton musicButton = new BooleanButton("Music", true);

            musicButton.Tapped += musicButton_Tapped;
            MenuButtons.Add(musicButton);

            Button creditButton = new Button("Credits");

            creditButton.Tapped += creditButton_Tapped;
            MenuButtons.Add(creditButton);

            //BooleanButton vibrateButton = new BooleanButton("Vibration", true);
            //vibrateButton.Tapped += vibrateButton_Tapped;
            //MenuButtons.Add(vibrateButton);
        }
        public PhoneMainMenuScreen()
            : base("Clockwise")
        {
            // Create a button to start the game
            Button playButton = new Button("Play");

            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);

            // Create two buttons to toggle sound effects and music. This sample just shows one way
            // of making and using these buttons; it doesn't actually have sound effects or music

            /*
             * BooleanButton sfxButton = new BooleanButton("Sound  ", true);
             * sfxButton.Tapped += sfxButton_Tapped;
             * MenuButtons.Add(sfxButton);
             */

            // Create a button to start the game
            Button highscoreButton = new Button("Score History");

            highscoreButton.Tapped += highScore_Tapped;
            MenuButtons.Add(highscoreButton);

            // Create a button to start the game
            Button aboutButton = new Button("About");

            aboutButton.Tapped += aboutButton_Tapped;
            MenuButtons.Add(aboutButton);
        }
示例#5
0
        private void InitilizeLanguages()
        {
            lettre      = lang.AffectationLANG("Lettres_mini_String", langue);
            retour      = lang.AffectationLANG("Retour", langue);
            valider     = lang.AffectationLANG("BOUTON_Valider", langue);
            facile      = lang.AffectationLANG("Facile", langue);
            difficile   = lang.AffectationLANG("Difficile", langue);
            aleatoire   = lang.AffectationLANG("Aleatoire", langue);
            mots_facile = lang.AffectationLANG("mots_facile", langue);

            facile    = facile.ToUpper();
            difficile = difficile.ToUpper();

            Vector2 _size     = new Vector2(200, 60);
            Vector2 _position = new Vector2(30, 600);

            gauche_position     = new Vector2(80, 500);
            droite_position     = new Vector2(320, 500);
            position_difficulte = new Vector2(240, 200);
            position_text1      = new Vector2(30, 350);
            position_text2      = new Vector2(30, 400);

            Button Retour  = new Button(retour.ToUpper(), _size, _position, new Color(255, 65, 67), new Color(255, 3, 2), Color.White);
            Button Valider = new Button(valider.ToUpper(), _size, new Vector2(_position.X + _size.X + 20, _position.Y), new Color(106, 181, 1), new Color(126, 215, 2), Color.White);

            Retour.Tapped  += Quitter;
            Valider.Tapped += ValiderSelected;

            MenuButtons.Add(Retour);
            MenuButtons.Add(Valider);
        }
示例#6
0
        public PhoneMainMenuScreen()
            : base("Menu")
        {
            // Create a button to start the game
            Button playButton = new Button("PLAY");

            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);

            // Create a button to the highscore
            Button highscoreButton = new Button("Leaderboard");

            highscoreButton.Tapped += new EventHandler <EventArgs>(highscoreButton_Tapped);
            MenuButtons.Add(highscoreButton);

            // Create two buttons to toggle sound effects and music. This sample just shows one way
            // of making and using these buttons; it doesn't actually have sound effects or music
            BooleanButton musicButton = new BooleanButton("Music", true);

            musicButton.Tapped += musicButton_Tapped;
            MenuButtons.Add(musicButton);

            Button creditButton = new Button("Credits");

            creditButton.Tapped += new EventHandler <EventArgs>(creditButton_Tapped);
            MenuButtons.Add(creditButton);
        }
        public EndGameScreen()
        {
            var content           = MatchGame.instance.Content;
            var menuButtonTexture = Resources.MenuButton;
            var menuButton        = new Button(menuButtonTexture, new Point((viewport.Width - menuButtonTexture.Width) / 2, 300));

            menuButton.Clicked += OkButtonClicked;
            MenuButtons.Add(menuButton);
            gameOverScreen = Resources.GameOverScreen;
        }
示例#8
0
        public LostLifeMenuScreen()
            : base("You Lost a Life!")
        {
            // Create the  "Lost Life Button"

            Button tryagainButton = new Button("Try Again!");

            tryagainButton.Tapped += tryagainButton_Tapped;
            MenuButtons.Add(tryagainButton);
        }
示例#9
0
 /// <summary>
 /// This binds the <paramref name="childMenu"/> menu to the <paramref name="menuItem"/> and sets the menu's parent to <paramref name="parentMenu"/>.
 /// </summary>
 /// <param name="parentMenu"></param>
 /// <param name="childMenu"></param>
 /// <param name="menuItem"></param>
 public static void BindMenuItem(Menu parentMenu, Menu childMenu, MenuItem menuItem)
 {
     AddSubmenu(parentMenu, childMenu);
     if (MenuButtons.ContainsKey(menuItem))
     {
         MenuButtons[menuItem] = childMenu;
     }
     else
     {
         MenuButtons.Add(menuItem, childMenu);
     }
 }
示例#10
0
        public MainMenuScreen()
        {
            var viewport = MatchGame.instance.spriteBatch.GraphicsDevice.Viewport;
            var width    = (viewport.Width - Resources.PlayButton.Width) / 2;
            var height   = (viewport.Height - Resources.PlayButton.Height) / 2;

            var playButton = new Button(Resources.PlayButton, new Point(width, height));

            playButton.Clicked += PlayGameMenuClicked;

            MenuButtons.Add(playButton);
        }
示例#11
0
        private void InitilizeLanguages()
        {
            valider          = lang.AffectationLANG("BOUTON_Valider", langue);
            changer_nom      = lang.AffectationLANG("Menu_changer_nom", langue);
            lettre_max       = lang.AffectationLANG("Menu_changer_nom_lettres_max", langue);
            nom              = lang.AffectationLANG("Nom", langue);
            theme_string     = lang.AffectationLANG("Themes", langue);
            vibration_string = lang.AffectationLANG("Vibration", langue);
            voir_score       = lang.AffectationLANG("Score_String", langue);
            aide             = lang.AffectationLANG("Aide", langue);
            rate             = lang.AffectationLANG("Noter", langue);

            Button theme1;

            if (theme == "classic")
            {
                theme1 = new Button("Classic", new Vector2(align_x2, y1));
            }
            else
            {
                theme1 = new Button("Tuiles", new Vector2(align_x2, y1));
            }

            Button nom_joueur  = new Button(_nom_joueur, new Vector2(align_x2, y2));
            Button _voir_score = new Button(voir_score, new Vector2(align_x2, y4));
            Button AideBouton  = new Button(aide, new Vector2(align_x2, y5));
            Button RateBouton  = new Button(rate, new Vector2(align_x2, y6));

            BooleanButton vibrationButton = new BooleanButton(vibrate, new Vector2(align_x2, y3));

            Vector2 _size     = new Vector2(200, 60);
            Vector2 _position = new Vector2(150, 700);
            Button  Retour    = new Button(valider.ToUpper(), _size, _position, new Color(106, 181, 1), new Color(126, 215, 2), Color.White);


            theme1.Tapped          += ThemeVoid;
            nom_joueur.Tapped      += ChangerNom;
            vibrationButton.Tapped += ChangerVibrate;
            _voir_score.Tapped     += VoirScore;
            AideBouton.Tapped      += GoAide;
            RateBouton.Tapped      += Rating;
            Retour.Tapped          += Quitter;

            MenuButtons.Add(theme1);
            MenuButtons.Add(nom_joueur);
            MenuButtons.Add(vibrationButton);
            MenuButtons.Add(_voir_score);
            MenuButtons.Add(AideBouton);
            MenuButtons.Add(RateBouton);
            MenuButtons.Add(Retour);
        }
示例#12
0
        /// <summary>
        /// Generates all of the buttons for the
        /// game over menu.
        /// </summary>
        private void MakeButtons()
        {
            var rec = new Rectangle(100, 300, 400, 100);

            for (int i = 0; i < NumberOfButtons; i++)
            {
                Button b = new Button(i, Color.Gray, rec);
                rec = new Rectangle(rec.X, rec.Y + rec.Height + 20, rec.Width, rec.Height);
                MenuButtons.Add(b);
            }

            MenuButtons[MainMenuIndex].GameState = StateManager.EGameState.MainMenu;
            MenuButtons[ExitIndex].GameState     = StateManager.EGameState.Exit;
        }
示例#13
0
        /// <summary>
        /// Generates all of the buttons for the
        /// pause menu.
        /// </summary>
        private void MakeButtons()
        {
            var rec = new Rectangle(25, 500, 250, 75);

            for (int i = 0; i < NumberOfButtons; i++)
            {
                Button b = new Button(i, Color.Gray, rec);
                rec = new Rectangle(rec.X + rec.Width + 50, rec.Y, rec.Width, rec.Height);
                MenuButtons.Add(b);
            }

            SetReturnState(FirstIndex);
            NullState(SecondIndex);
        }
示例#14
0
        public PhonePauseScreen()
            : base("Paused")
        {
            // Create the "Resume" and "Exit" buttons for the screen

            Button resumeButton = new Button("Resume");

            resumeButton.Tapped += resumeButton_Tapped;
            MenuButtons.Add(resumeButton);

            Button exitButton = new Button("Exit");

            exitButton.Tapped += exitButton_Tapped;
            MenuButtons.Add(exitButton);
        }
示例#15
0
        /// <summary>
        /// Generates all of the buttons for the
        /// main menu.
        /// </summary>
        private void MakeButtons()
        {
            var rec = new Rectangle(0, 325, 200, 200);

            for (int i = 0; i < NumberOfButtons; i++)
            {
                Button b = new Button(i, Color.Gray, rec);
                rec = new Rectangle(rec.X + rec.Width, rec.Y, rec.Width, rec.Height);
                MenuButtons.Add(b);
            }

            MenuButtons[RedIndex].GameState   = StateManager.EGameState.RedLevelUp;
            MenuButtons[GreenIndex].GameState = StateManager.EGameState.GreenLevelUp;
            MenuButtons[BlueIndex].GameState  = StateManager.EGameState.BlueLevelUp;
        }
示例#16
0
        public WinScreen()
            : base("Congratulations!")
        {
            // Create the "Resume" and "Exit" buttons for the screen

            Button restartButton = new Button("Restart");

            restartButton.Tapped += restartButton_Tapped;
            MenuButtons.Add(restartButton);

            Button exitButton = new Button("Exit");

            exitButton.Tapped += exitButton_Tapped;
            MenuButtons.Add(exitButton);
        }
示例#17
0
        public GameOverScreen()
            : base("Game Over!")
        {
            // Create the "Resume" and "Exit" buttons for the screen

            Button retryButton = new Button("Retry");

            retryButton.Tapped += retryButton_Tapped;
            MenuButtons.Add(retryButton);

            Button exitButton = new Button("Exit");

            exitButton.Tapped += exitButton_Tapped;
            MenuButtons.Add(exitButton);
        }
示例#18
0
        public GameOverMenuScreen()
            : base("GAME OVER")
        {
            // Create the  Try Again Button

            Button tryagainButton = new Button("Try Again");

            tryagainButton.Tapped += tryagainButton_Tapped;
            MenuButtons.Add(tryagainButton);

            Button highscoreButton = new Button("Highscore");

            highscoreButton.Tapped += new EventHandler <EventArgs>(highscoreButton_Tapped);
            MenuButtons.Add(highscoreButton);
        }
示例#19
0
        /// <summary>
        /// END PROPERTIES
        /// </summary>
        /// <summary>
        /// Custom constructor
        /// </summary>
        public Menu(string[] buttonNames, string aName, int consoleWidth, int consoleHeight)
        {
            Name = aName;

            int i = 0;

            foreach (string name in buttonNames)
            {
                i++;

                // Creation of the menu options throughout the custom constructor of the MenuButton class
                MenuButton newBtn = new MenuButton(new Vector2D(2 * consoleWidth / 3, consoleHeight / 4 + (5 * i)),
                                                   name.ToUpper());
                MenuButtons.Add(newBtn);
            }
        }
示例#20
0
        /// <summary>
        /// Generates all of the buttons for the
        /// main menu.
        /// </summary>
        private void MakeButtons()
        {
            var rec = new Rectangle(175, 250, 250, 65);

            for (int i = 0; i < NumberOfButtons; i++)
            {
                Button b = new Button(i, Color.Gray, rec);
                rec = new Rectangle(rec.X, rec.Y + rec.Height + 20, rec.Width, rec.Height);
                MenuButtons.Add(b);
            }

            MenuButtons[StartIndex].GameState   = StateManager.EGameState.Game;
            MenuButtons[HowToIndex].GameState   = StateManager.EGameState.HowTo;
            MenuButtons[OptionsIndex].GameState = StateManager.EGameState.Options;
            MenuButtons[ExitIndex].GameState    = StateManager.EGameState.Exit;
        }
示例#21
0
        private void InitilizeLanguages()
        {
            retour = lang.AffectationLANG("Retour", langue);

            Button theme1      = new Button("Classic");
            Button theme2      = new Button("Light Color");
            Button Menu_retour = new Button(retour.ToUpper());

            theme1.Tapped      += Classic;
            theme2.Tapped      += Tuiles;
            Menu_retour.Tapped += Quitter;

            MenuButtons.Add(theme1);
            MenuButtons.Add(theme2);
            MenuButtons.Add(Menu_retour);
        }
示例#22
0
        private void InitilizeLanguages()
        {
            if (!trial)
            {
                entrainement  = lang.AffectationLANG("Entrainement", langue);
                jouer         = lang.AffectationLANG("Jouer", langue);
                quitter       = lang.AffectationLANG("Quitter", langue);
                newgame       = lang.AffectationLANG("NewGame", langue);
                joueur        = lang.AffectationLANG("Joueur_String", langue);
                nombre_lettre = lang.AffectationLANG("Nombre_de_lettres", langue);
                option        = lang.AffectationLANG("Options", langue);

                Button startRapideGameMenuEntry = new Button(entrainement);
                Button startGameMenuEntry       = new Button(jouer);
                Button OptionEntry   = new Button(option);
                Button exitMenuEntry = new Button(quitter.ToUpper());

                startRapideGameMenuEntry.Tapped += StartRapideGameMenuEntrySelected;
                startGameMenuEntry.Tapped       += StartGameMenuEntrySelected;
                OptionEntry.Tapped   += OptionEntrySelected;
                exitMenuEntry.Tapped += Quitter;

                MenuButtons.Add(startRapideGameMenuEntry);
                MenuButtons.Add(startGameMenuEntry);
                MenuButtons.Add(OptionEntry);
                MenuButtons.Add(exitMenuEntry);
            }
            else
            {
                jouer   = lang.AffectationLANG("Jouer", langue);
                option  = lang.AffectationLANG("Options", langue);
                acheter = lang.AffectationLANG("Acheter", langue);

                Button startGameMenuEntry = new Button(jouer);
                Button OptionEntry        = new Button(option);
                Button Acheter            = new Button(acheter);

                startGameMenuEntry.Tapped += JouerTrial;
                OptionEntry.Tapped        += OptionEntrySelected;
                Acheter.Tapped            += AcheterSelected;

                MenuButtons.Add(startGameMenuEntry);
                MenuButtons.Add(OptionEntry);
                MenuButtons.Add(Acheter);
            }
        }
示例#23
0
        /// <summary>
        /// Generates all of the buttons for the
        /// pause menu.
        /// </summary>
        private void MakeButtons()
        {
            //var rec = new Rectangle(25, 500, 250, 75);
            var rec = new Rectangle(175, 250, 250, 60);

            for (int i = 0; i < NumberOfButtons; i++)
            {
                Button b = new Button(i, Color.Gray, rec);
                rec = new Rectangle(rec.X, rec.Y + rec.Height + 20, rec.Width, rec.Height);
                MenuButtons.Add(b);
            }

            NullState(VolumeIndex);
            NullState(EasyIndex);
            NullState(HardIndex);
            MenuButtons[MenuIndex].GameState = StateManager.EGameState.MainMenu;
        }
示例#24
0
        private void InitilizeLanguages()
        {
            retour           = lang.AffectationLANG("Retour", langue);
            marathon         = lang.AffectationLANG("Marathon", langue);
            contre_la_montre = lang.AffectationLANG("contre_la_montre", langue);

            Button lettre8     = new Button(marathon);
            Button lettre9     = new Button(contre_la_montre);
            Button Menu_retour = new Button(retour.ToUpper());

            lettre8.Tapped     += Motus8;
            lettre9.Tapped     += Motus9;
            Menu_retour.Tapped += Quitter;

            MenuButtons.Add(lettre8);
            MenuButtons.Add(lettre9);
            MenuButtons.Add(Menu_retour);
        }
示例#25
0
        private void InitilizeLanguages()
        {
            marathon = lang.AffectationLANG("Marathon", langue);
            montre   = lang.AffectationLANG("contre_la_montre", langue);
            retour   = lang.AffectationLANG("Retour", langue);

            Button Marathon = new Button(marathon);
            Button Montre   = new Button(montre);
            Button Retour   = new Button(retour);

            Marathon.Tapped += MarathonSelected;
            Montre.Tapped   += MontreSelected;
            Retour.Tapped   += RetourSelected;

            MenuButtons.Add(Marathon);
            MenuButtons.Add(Montre);
            MenuButtons.Add(Retour);
        }
示例#26
0
        public PhoneMainMenuScreen()
            : base("Main Menu")
        {
            // Create a button to start the game
            Button playButton = new Button("Play");

            playButton.Tapped += playButton_Tapped;
            MenuButtons.Add(playButton);

            // Create two buttons to toggle sound effects and music. This sample just shows one way
            // of making and using these buttons; it doesn't actually have sound effects or music
            BooleanButton sfxButton = new BooleanButton("Sound Effects", true);

            sfxButton.Tapped += sfxButton_Tapped;
            MenuButtons.Add(sfxButton);

            BooleanButton musicButton = new BooleanButton("Music", true);

            musicButton.Tapped += musicButton_Tapped;
            MenuButtons.Add(musicButton);
        }
        public ReadyScreen(string readyCrashText)
            : base(readyCrashText)
        {
            // Create the "Resume" and "Exit" buttons for the screen
            if (readyCrashText.Equals("Crash!"))
            {
                Button startButton = new Button("Continue?");
                startButton.Tapped += startButton_Tapped;
                MenuButtons.Add(startButton);
            }
            else
            {
                Button startButton = new Button("Start!");
                startButton.Tapped += startButton_Tapped;
                MenuButtons.Add(startButton);
            }

            Button exitButton = new Button("Exit");

            exitButton.Tapped += exitButton_Tapped;
            MenuButtons.Add(exitButton);
        }
示例#28
0
文件: Menu.cs 项目: jwchau/SayAgain
 public Menu(string type)
 {
     this.type = type;
     if (type == "start")
     {
         //Console.WriteLine("MENU START S_W: " + SCREEN_WIDTH + ", S_H: " + SCREEN_HEIGHT);
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 3, "Start"));
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 3 + (float)(SCREEN_HEIGHT * .15), "Settings"));
     }
     else if (type == "settings")
     {
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 3, "Sound"));
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 3 + (float)(SCREEN_HEIGHT * .15), "Back"));
     }
     else if (type == "pause")
     {
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 - (float)(SCREEN_HEIGHT * .15), "Back"));
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, "Settings"));
         MenuButtons.Add(new MenuButton(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2 + (float)(SCREEN_HEIGHT * .15), "Quit"));
         pauseBG          = new Sprite(new Texture("../../Art/UI_Art/buttons n boxes/pausemenu.png"));
         pauseBG.Scale    = new Vector2f(SCREEN_WIDTH / 1920, SCREEN_HEIGHT / 1080);
         pauseBG.Position = new Vector2f(SCREEN_WIDTH / 2 - pauseBG.GetGlobalBounds().Width / 2, SCREEN_HEIGHT / 2 - pauseBG.GetGlobalBounds().Height / 2);
     }
 }
示例#29
0
        public MainWindow()
        {
            #region WPF Init
            InitializeComponent();
            DataContext = this;

            // Subscribe on events
            SizeChanged += MainWindow_SizeChanged;                                   // Window size changing.
            logonScreen.LogonPanel_LoginCallback  += LogonScreen_LoginButton;        // Login button
            logonScreen.RegPanel_ContinueCallback += LogonScreen_RegistrationButton; // Registration button
            #endregion

            #region Plugins initializing.
            // Initialize client. Also will load assemblies and XAML dictionaries.
            Client.Init();

            // Load plugins.
            Plugins = API.LoadPluginsCollection();

            // Sort plugins
            API.SortByDomains(Plugins);
            #endregion

            #region Load main menu
            // Add hardcoded UI to collection.
            foreach (FrameworkElement fe in MainMenu.Items)
            {
                MenuButtons.Add(fe);
            }

            // Connect all plugins to main menu to provide access via UI.
            foreach (IPlugin plugin in Plugins)
            {
                if (plugin.Meta != null)
                {
                    // Compute hierarchy level
                    int _hierarchyLevel = plugin.Meta.domain.Split('.').Length;

                    // Add space before paragraph.
                    if (_hierarchyLevel <= 1)
                    {
                        MenuButtons.Add(new ItemsControl()
                        {
                            Height = 20
                        });
                    }

                    // Try to load name from dictionary.
                    string title = null;
                    try
                    {
                        // load title from dictionary.
                        title = FindResource(plugin.Meta.titleDictionaryCode) as string;
                    }
                    catch
                    {
                        // Set default title or dict code if title not found.
                        title = plugin.Meta.defaultTitle ?? plugin.Meta.titleDictionaryCode;
                    }

                    // Create button by meta.
                    MenuButtons.Add(
                        new WpfHandler.UI.Controls.CatalogButton()
                    {
                        Label = title,
                        // Set uniformed text offset in hierarchy tree.
                        HierarchyLevel = _hierarchyLevel,
                        // Set root level as bool, others as thin.
                        FontWeight = _hierarchyLevel > 1 ? FontWeights.Thin : FontWeights.SemiBold,
                        // Setup plugin activator
                        ClickCallback = plugin.OnStart
                    });
                }
            }

            // Clear previos collection.
            MainMenu.Items.Clear();
            // Apply plugins to item source.
            MainMenu.ItemsSource = MenuButtons;
            #endregion
        }