예제 #1
0
        private void setOptions()
        {
            SelectionComponent selections = new SelectionComponent("Fonts/MaturaOptions", new Vector2(95, 120), Color.Red);

            selections.addSelection("Motion");
            selections.addSelection("Buttons");

            selections.addButton(new ButtonType("Menus/Arrow Button", "Menus/Arrow Pressed", new Vector2(60, 120)), 0);
            selections.addButton(new ButtonType("Menus/Arrow Button", "Menus/Arrow Pressed", new Vector2(194, 120), new Rectangle(194, 120, 20, 20), SpriteEffects.FlipHorizontally), 1);

            selections.Change += ChangeControls;

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

            addComponent(selections);

            GraphicSelectionComponent graphics = new GraphicSelectionComponent();

            graphics.addGraphic(new GraphicType("Menus/Control Scheme 1", new Vector2(66, 145)));
            graphics.addGraphic(new GraphicType("Menus/Control Scheme 2", new Vector2(66, 145)));

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

            addComponent(graphics);

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

            OptionType option = new OptionType(new OptionType("Save", new Vector2(136, 400), Color.Red, OptionAction.previous, true, true, "Menus/Highlighter", new Vector2(137, 400)));

            option.Selected += SaveControls;
            options.addOption(option);

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

            options.setAlignment(TextAlignment.center);

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

            addComponent(options);
        }
예제 #2
0
        private void setOptions()
        {
            SelectionComponent selections = new SelectionComponent("Fonts/MaturaOptions", new Vector2(95, 120), Color.Red);

            selections.addSelection("O Block");
            selections.addSelection("T Block");
            selections.addSelection("I Block");
            selections.addSelection("J Block");
            selections.addSelection("L Block");
            selections.addSelection("S Block");
            selections.addSelection("Z Block");

            selections.addButton(new ButtonType("Menus/Arrow Button", "Menus/Arrow Pressed", new Vector2(60, 120)), 0);
            selections.addButton(new ButtonType("Menus/Arrow Button", "Menus/Arrow Pressed", new Vector2(194, 120), new Rectangle(194, 120, 20, 20), SpriteEffects.FlipHorizontally), 1);

            selections.Change += ChangeBlock;

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

            addComponent(selections);

            TextListComponent text = new TextListComponent("Fonts/MaturaOptions");

            text.addText("Red:", new Vector2(50, 155), Color.Red);
            text.addText("Green:", new Vector2(50, 215), Color.Red);
            text.addText("Blue:", new Vector2(50, 275), Color.Red);

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

            NumberSlideComponent slide = new NumberSlideComponent("Menus/Meter", "Menus/Knob", new Vector2(50, 180), new Rectangle(59, 180, 157, 25));

            slide.SetValue    += SetRed;
            slide.ChangeValue += ChangeRed;

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

            addComponent(slide);

            slide              = new NumberSlideComponent("Menus/Meter", "Menus/Knob", new Vector2(50, 240), new Rectangle(59, 240, 157, 25));
            slide.SetValue    += SetGreen;
            slide.ChangeValue += ChangeGreen;

            slide.Identifier = "Number Slide 2";

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

            addComponent(slide);

            slide              = new NumberSlideComponent("Menus/Meter", "Menus/Knob", new Vector2(50, 300), new Rectangle(59, 300, 157, 25));
            slide.SetValue    += SetBlue;
            slide.ChangeValue += ChangeBlue;

            slide.Identifier = "Number Slide 3";

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

            addComponent(slide);

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

            OptionType option = new OptionType(new OptionType("Save", new Vector2(136, 390), Color.Red, OptionAction.previous, true, true, "Menus/Highlighter", new Vector2(137, 390)));

            option.Selected += SaveColors;
            options.addOption(option);

            option           = new OptionType(new OptionType("Cancel", new Vector2(136, 420), Color.Red, OptionAction.previous, true, true, "Menus/Highlighter", new Vector2(137, 420)));
            option.Selected += DiscardColors;
            options.addOption(option);

            options.setAlignment(TextAlignment.center);

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

            addComponent(options);
        }