// public RecastNavigationSystemExtendedFunctionalityDescriptor(Control parentControl, object owner) : base(parentControl, owner) { recastSystem = (RecastNavigationSystem)owner; Button button; int posY = 8; //Geometries toolbox button button = new EditorBase.Theme.EditorButton(); parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(8, posY); button.Size = new System.Drawing.Size(140, 32); button.Text = Translate("Collision"); button.UseVisualStyleBackColor = true; button.Click += new EventHandler(geometriesButton_Click); //Build toolbox button button = new EditorBase.Theme.EditorButton(); parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(140 + 8 * 2, posY); button.Size = new System.Drawing.Size(140, 32); button.Text = Translate("Rebuild"); button.UseVisualStyleBackColor = true; button.Click += new EventHandler(buildButton_Click); posY += 36; //Destroy toolbox button button = new EditorBase.Theme.EditorButton(); buttonClear = button; parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(8, posY); button.Size = new System.Drawing.Size(140, 32); button.Text = Translate("Clear"); button.UseVisualStyleBackColor = true; button.Click += new EventHandler(clearButton_Click); //Test NavMesh toolbox button button = new EditorBase.Theme.EditorButton(); buttonTest = button; parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(140 + 8 * 2, posY); button.Size = new System.Drawing.Size(140, 32); button.Text = Translate("Test"); button.UseVisualStyleBackColor = true; button.Click += new EventHandler(testButton_Click); timer = new Timer(); timer.Interval = 50; timer.Start(); timer.Tick += new EventHandler(timer_Tick); UpdateControls(); }
// public GridBasedNavigationSystemExtendedFunctionalityDescriptor(Control parentControl, object owner) : base(parentControl, owner) { system = (GridBasedNavigationSystem)owner; int width = parentControl.Size.Width - 16; Button button; //NumericUpDown numericUpDown; //Label label; CheckBox checkBox; int posY = 8; //Update button button = new EditorBase.Theme.EditorButton(); parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(8, posY); button.Size = new System.Drawing.Size(120, 32); button.Text = Translate("Update"); button.UseVisualStyleBackColor = true; button.Click += delegate(object sender, EventArgs e) { system.UpdateMotionMap(); }; //Path test button button = new EditorBase.Theme.EditorButton(); parentControl.Controls.Add(button); button.Location = new System.Drawing.Point(120 + 8 * 2, posY); button.Size = new System.Drawing.Size(120, 32); button.Text = Translate("Test"); button.UseVisualStyleBackColor = true; button.Click += new EventHandler(buttonTestPathFind_Click); posY += 36; ////numericUpDownMaxFieldsDistance //label = new Label(); //label.Text = "Test: Max fields distance"; //label.Location = new System.Drawing.Point( 8, posY ); //posY += 20; //label.AutoSize = true; //parentControl.Controls.Add( label ); //numericUpDown = new NumericUpDown(); //numericUpDownMaxFieldsDistance = numericUpDown; //parentControl.Controls.Add( numericUpDown ); //numericUpDown.Location = new System.Drawing.Point( 8 + label.Size.Width + 8, posY ); posY += 24; //numericUpDown.Size = new System.Drawing.Size( 75, numericUpDown.Size.Height ); //numericUpDown.TextAlign = HorizontalAlignment.Right; //numericUpDown.Minimum = 1; //numericUpDown.Maximum = 10000000; //numericUpDown.Value = 10000000; ////numericUpDownMaxFieldsToCheck //label = new Label(); //label.Text = "Test: Max fields to check"; //label.Location = new System.Drawing.Point( 8, posY ); //posY += 20; //label.AutoSize = true; //parentControl.Controls.Add( label ); //numericUpDown = new NumericUpDown(); //numericUpDownMaxFieldsToCheck = numericUpDown; //parentControl.Controls.Add( numericUpDown ); //numericUpDown.Location = new System.Drawing.Point( 8 + label.Size.Width + 8, posY ); posY += 24; //numericUpDown.Size = new System.Drawing.Size( 75, numericUpDown.Size.Height ); //numericUpDown.TextAlign = HorizontalAlignment.Right; //numericUpDown.Minimum = 1; //numericUpDown.Maximum = 10000000; //numericUpDown.Value = 10000000; //checkBoxSmooth checkBox = new EditorBase.Theme.EditorCheckBox(); checkBoxSmooth = checkBox; parentControl.Controls.Add(checkBox); checkBox.Location = new System.Drawing.Point(8, posY); checkBox.AutoSize = true; checkBox.Text = Translate("Smooth the path in test mode"); checkBox.UseVisualStyleBackColor = true; checkBox.Checked = true; posY += 26; //checkBoxVisualize checkBox = new EditorBase.Theme.EditorCheckBox(); checkBoxVisualize = checkBox; parentControl.Controls.Add(checkBox); checkBox.Location = new System.Drawing.Point(8, posY); checkBox.AutoSize = true; checkBox.Text = Translate("Visualize path finding in test mode"); checkBox.UseVisualStyleBackColor = true; }