Example #1
0
        private void setOptions()
        {
            ScrollOptionsComponent list = new ScrollOptionsComponent("Fonts/MaturaOptions", new Rectangle(30, 100, 212, 320));

            list.addOption(new OptionType("<No Songs Added>", new Vector2(30, 100), Color.Red, OptionAction.nothing, false, false, "Menus/Highlighter", new Vector2(30, 100)));

            list.setTransitions(new MoveCollection(new Vector2(-200, 0), 15, true), new MoveCollection(new Vector2(200, 0), 15, false));

            addComponent(list);

            OptionsComponent options = new OptionsComponent("Fonts/MaturaOptions");

            options.addOption(new OptionType("Back", new Vector2(136, 430), Color.Red, OptionAction.previous, true, true, "Menus/Highlighter", new Vector2(137, 430)));

            options.setAlignment(TextAlignment.center);
            options.setTransitions(new MoveCollection(new Vector2(-200, 0), 15, true), new MoveCollection(new Vector2(200, 0), 15, false));
            addComponent(options);
        }
Example #2
0
        public void setDisplayList(string fontAsset, string highlighterAsset, Rectangle boudingBox, Color color, Vector2 highlighterLocation, int optionFactor, ITransition intro, ITransition revert, ITransition select, ITransition exit)
        {
            ScrollOptionsComponent optionList = new ScrollOptionsComponent(fontAsset, boudingBox);

            for (int i = 0; i < songs.Count; i++)
            {
                OptionType option = new OptionType(songs[i].Name, new Vector2(boudingBox.X, boudingBox.Y + optionFactor * i),
                                                   color, new Rectangle(boudingBox.X, boudingBox.Y + optionFactor * i, boudingBox.Width, optionFactor),
                                                   OptionAction.nothing, "Collection Songs", highlighterAsset, new Vector2(highlighterLocation.X, highlighterLocation.Y + i * optionFactor));

                option.Selected += AddSong;

                optionList.addOption(option);
            }

            optionList.setTransitions(intro, revert, select, exit);

            addComponent(optionList);
        }