Example #1
0
        /// <summary>
        ///   Required method for user interface initialization -
        ///   do modify the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.lblBabyPackage       = new Nuclex.UserInterface.Controls.LabelControl();
            this.lblBabyPackagePath   = new Nuclex.UserInterface.Controls.LabelControl();
            this.btnBabyPackageBrowse = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();

            this.lblKeyBashingThreshold = new Nuclex.UserInterface.Controls.LabelControl();
            this.txtKeyBashingThreshold = new Nuclex.UserInterface.Controls.Desktop.InputControl();

            this.lblRunOnAllMonitors = new Nuclex.UserInterface.Controls.LabelControl();
            this.chkRunOnAllMonitors = new Nuclex.UserInterface.Controls.Desktop.OptionControl();

            this.lblMouseRequired = new Nuclex.UserInterface.Controls.LabelControl();
            this.chkMouseRequired = new Nuclex.UserInterface.Controls.Desktop.OptionControl();

            this.lblAutoPublishErrors = new Nuclex.UserInterface.Controls.LabelControl();
            this.chkAutoPublishErrors = new Nuclex.UserInterface.Controls.Desktop.OptionControl();

            this.lblDeveloperMode = new Nuclex.UserInterface.Controls.LabelControl();
            this.chkDeveloperMode = new Nuclex.UserInterface.Controls.Desktop.OptionControl();

            this.lblDisabledKeys     = new Nuclex.UserInterface.Controls.LabelControl();
            this.lblDisabledKeyCount = new Nuclex.UserInterface.Controls.LabelControl();
            this.btnDisableKeys      = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();

            this.lblErrorMessage = new Nuclex.UserInterface.Controls.LabelControl();


            this.btnUndo  = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            this.btnClose = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            this.btnAbout = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();

            //
            // lblBabyPackage
            //
            this.lblBabyPackage.Text   = "Baby Package of sounds and shapes:";
            this.lblBabyPackage.Bounds = new UniRectangle(20.0f, 30.0f, 300.0f, 30.0f);
            //
            // lblBabyPackagePath
            //
            this.lblBabyPackagePath.Bounds = new UniRectangle(30.0f, 50.0f, 300.0f, 30.0f);
            //
            // btnBabyPackageBrowse
            //
            this.btnBabyPackageBrowse.Bounds   = new UniRectangle(350.0f, 30.0f, 80.0f, 24.0f);
            this.btnBabyPackageBrowse.Pressed += new EventHandler(this.btnBabyPackageBrowse_Pressed);
            this.btnBabyPackageBrowse.Text     = "Select";

            //
            // lblKeyBashingThreshold
            //
            this.lblKeyBashingThreshold.Text   = "Key Bashing Threshold (0 to turn off):";
            this.lblKeyBashingThreshold.Bounds = new UniRectangle(20.0f, 90.0f, 300.0f, 30.0f);
            //
            // txtKeyBashingThreshold
            //
            this.txtKeyBashingThreshold.Bounds = new UniRectangle(350.0f, 90.0f, 60.0f, 30.0f);


            //
            // lblMouseRequired
            //
            this.lblMouseRequired.Text   = "Must Press Mouse Button When Moving:";
            this.lblMouseRequired.Bounds = new UniRectangle(20.0f, 120.0f, 300.0f, 30.0f);
            //
            // chkMouseRequired
            //
            this.chkMouseRequired.Bounds = new UniRectangle(350.0f, 120.0f, 60.0f, 30.0f);


            //
            // lblAutoPublishErrors
            //
            this.lblAutoPublishErrors.Text   = "Automatically Publish Errors to Murray:";
            this.lblAutoPublishErrors.Bounds = new UniRectangle(20.0f, 150.0f, 300.0f, 30.0f);
            //
            // chkAutoPublishErrors
            //
            this.chkAutoPublishErrors.Bounds = new UniRectangle(350.0f, 150.0f, 60.0f, 30.0f);


            //
            // lblDeveloperMode
            //
            this.lblDeveloperMode.Text   = "Developer Mode:";
            this.lblDeveloperMode.Bounds = new UniRectangle(20.0f, 180.0f, 300.0f, 30.0f);
            //
            // chkDeveloperMode
            //
            this.chkDeveloperMode.Bounds = new UniRectangle(350.0f, 180.0f, 60.0f, 30.0f);


            //
            // lblRunOnAllMonitors
            //
            this.lblRunOnAllMonitors.Text   = "Run on all Monitors (Must Restart BabyBash):";
            this.lblRunOnAllMonitors.Bounds = new UniRectangle(20.0f, 150.0f, 300.0f, 30.0f);
            //
            // chkRunOnAllMonitors
            //
            this.chkRunOnAllMonitors.Bounds = new UniRectangle(350.0f, 150.0f, 60.0f, 30.0f);


            //
            // lblDisabledKeys
            //
            this.lblDisabledKeys.Text   = "Deactivated Keys:";
            this.lblDisabledKeys.Bounds = new UniRectangle(20.0f, 180.0f, 300.0f, 30.0f);
            //
            // lblDisabledKeyCount
            //
            this.lblDisabledKeyCount.Text   = "{0} Deactivated";
            this.lblDisabledKeyCount.Bounds = new UniRectangle(450.0f, 180.0f, 300.0f, 30.0f);
            //
            // btnDisableKeys
            //
            this.btnDisableKeys.Bounds   = new UniRectangle(350.0f, 180.0f, 80f, 24f);
            this.btnDisableKeys.Pressed += new EventHandler(this.btnDisableKeys_Pressed);
            this.btnDisableKeys.Text     = "Choose";


            //
            // lblErrorMessage
            //
            this.lblErrorMessage.Text   = "";
            this.lblErrorMessage.Bounds = new UniRectangle(20.0f, 230.0f, 300.0f, 30.0f);

            //
            // btnUndo
            //
            this.btnUndo.Bounds = new UniRectangle(
                new UniScalar(1.0f, -250.0f), new UniScalar(1.0f, -40.0f), 80, 24
                );
            this.btnUndo.Pressed += new EventHandler(this.undoButton_Pressed);
            this.btnUndo.Text     = "Undo";
            //
            // btnClose
            //
            this.btnClose.Bounds = new UniRectangle(
                new UniScalar(1.0f, -160.0f), new UniScalar(1.0f, -40.0f), 140, 24
                );
            this.btnClose.Pressed += new EventHandler(this.closeButton_Pressed);
            this.btnClose.Text     = "Save and Close";
            //
            // btnAbout
            //
            this.btnAbout.Bounds = new UniRectangle(
                new UniScalar(0.0f, 40.0f), new UniScalar(1.0f, -40.0f), 80, 24
                );
            this.btnAbout.Pressed += new EventHandler(this.creditsButton_Pressed);
            this.btnAbout.Text     = "About";

            //
            // DemoDialog
            //
            this.Bounds = new UniRectangle(new UniScalar(0, 0), new UniScalar(0, 0), 600f, 300f);
            this.Title  = "Options";

            this.Children.Add(this.lblBabyPackage);
            this.Children.Add(this.lblBabyPackagePath);
            this.Children.Add(this.btnBabyPackageBrowse);

            this.Children.Add(this.lblKeyBashingThreshold);
            this.Children.Add(this.txtKeyBashingThreshold);

            this.Children.Add(this.lblMouseRequired);
            this.Children.Add(this.chkMouseRequired);

            this.Children.Add(this.lblAutoPublishErrors);
            this.Children.Add(this.chkAutoPublishErrors);

            this.Children.Add(this.lblDeveloperMode);
            this.Children.Add(this.chkDeveloperMode);

            // Disable these until they're implemented.
            //this.Children.Add(this.lblRunOnAllMonitors);
            //this.Children.Add(this.chkRunOnAllMonitors);

            //this.Children.Add(this.lblDisabledKeys);
            //this.Children.Add(this.lblDisabledKeyCount);
            //this.Children.Add(this.btnDisableKeys);

            this.Children.Add(this.lblErrorMessage);

            this.Children.Add(this.btnUndo);
            this.Children.Add(this.btnClose);
            this.Children.Add(this.btnAbout);
        }
Example #2
0
        public void initializeMenuScreen()
        {
            perkTree = new PerkTree();
            effects = new Effects();

            //initialize elements
            speciesList = new Nuclex.UserInterface.Controls.Desktop.ListControl();
            Nuclex.UserInterface.Controls.Desktop.ButtonControl createButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            //menuSlider = new Nuclex.UserInterface.Controls.Desktop.HorizontalSliderControl();
            description = new Nuclex.UserInterface.Controls.LabelControl();

            speciesList.Bounds = new UniRectangle(new UniScalar(0.0f, 50.0f),new UniScalar(0.0f, 200.0f),new UniScalar(0.0f, 300.0f),new UniScalar(0.0f, 300.0f));
            speciesList.SelectionMode = Nuclex.UserInterface.Controls.Desktop.ListSelectionMode.Single;

            createButton.Bounds = new UniRectangle(new UniScalar(0.0f, 50.0f),new UniScalar(0.0f, 505.0f),new UniScalar(0.0f, 300.0f),new UniScalar(0.0f, 50.0f));
            createButton.Text = "New Species";

            //menuSlider.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.75f, 0),new UniScalar(0.5f,0), new UniScalar(0.0f, 30));
            //menuSlider.ThumbSize = 0.1f;
            //menuSlider.Moved += new EventHandler(perkSliderMoved);

            description.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.8f, 0), new UniScalar(0.5f, 0), new UniScalar(0.2f, 0));
            description.Text = Sprites.description;

            //menuScreen.Desktop.Children.Add(menuSlider);
            //menuScreen.Desktop.Children.Add(speciesList);
            //menuScreen.Desktop.Children.Add(createButton);
            menuScreen.Desktop.Children.Add(description);
        }
Example #3
0
        /// <summary>
        ///   Required method for user interface initialization -
        ///   do modify the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.btnClose        = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            this.btnCheckUpdates = new Nuclex.UserInterface.Controls.Desktop.ButtonControl();
            this.lblUpdateInfo   = new Nuclex.UserInterface.Controls.LabelControl();
            this.lblCopyright    = new Nuclex.UserInterface.Controls.LabelControl();
            this.lblWebsite      = new Nuclex.UserInterface.Controls.LabelControl();
            this.lblVersion      = new Nuclex.UserInterface.Controls.LabelControl();

            //
            // lblCopyright
            //
            this.lblCopyright.Bounds = new UniRectangle(
                new UniScalar(0.0f, 20.0f), new UniScalar(0.0f, 40.0f),
                new UniScalar(0.6f, -30.0f), 25
                );
            this.lblCopyright.Text = "Baby Bash XNA - Copyright Murray Grant 2011";

            //
            // lblWebsite
            //
            this.lblWebsite.Bounds = new UniRectangle(
                new UniScalar(0.0f, 20.0f), new UniScalar(0.0f, 65.0f),
                new UniScalar(0.6f, -30.0f), 25
                );
            this.lblWebsite.Text = "http://babybashxna.codeplex.com";

            //
            // lblVersion
            //
            this.lblVersion.Bounds = new UniRectangle(
                new UniScalar(0.0f, 40.0f), new UniScalar(0.0f, 90.0f),
                new UniScalar(0.6f, -30.0f), 25
                );
            this.lblVersion.Text = "Version: " + Helper.GetApplicationVesion().ToString();


            //
            // lblUpdateInfo
            //
            this.lblUpdateInfo.Bounds = new UniRectangle(
                new UniScalar(0.0f, 20.0f), new UniScalar(1.0f, -80.0f),
                new UniScalar(0.8f, -30.0f), 25
                );
            this.lblUpdateInfo.Text = String.Empty;

            //
            // btnCheckUpdates
            //
            this.btnCheckUpdates.Bounds = new UniRectangle(
                new UniScalar(0.0f, 20.0f), new UniScalar(1.0f, -40.0f), 130, 24
                );
            this.btnCheckUpdates.Text     = "Check for Updates";
            this.btnCheckUpdates.Pressed += new EventHandler(this.btnCheckUpdates_Pressed);
            //
            // btnClose
            //
            this.btnClose.Bounds = new UniRectangle(
                new UniScalar(1.0f, -100.0f), new UniScalar(1.0f, -40.0f), 80, 24
                );
            this.btnClose.Text     = "Close";
            this.btnClose.Pressed += new EventHandler(this.btnClose_Pressed);

            //
            // DemoDialog
            //
            this.Bounds = new UniRectangle(new UniScalar(0, -20.0f), new UniScalar(0, -20.0f), 430, 200);
            this.Title  = "About";

            this.Children.Add(this.btnClose);
            this.Children.Add(this.btnCheckUpdates);
            this.Children.Add(this.lblUpdateInfo);
            this.Children.Add(this.lblCopyright);
            this.Children.Add(this.lblWebsite);
            this.Children.Add(this.lblVersion);
        }