Example #1
0
        }   // end of BaseMouseEditTool Update()

        /// <summary>
        /// Override this to provide a place to initialize
        /// anything that needs to be done on a per-use basis.
        /// </summary>
        public virtual void OnActivate()
        {
            // Get references.  We can't do this in the
            // c'tor since not all of these exist yet.
            inGame = Boku.InGame.inGame;
            shared = inGame.shared;

            materialPicker = inGame.mouseEditUpdateObj.ToolBox.MaterialPicker;
            waterPicker    = inGame.mouseEditUpdateObj.ToolBox.WaterPicker;
            brushPicker    = inGame.mouseEditUpdateObj.ToolBox.BrushPicker;

            starting     = true;
            StretchPhase = Phase.Open;

            shared.editBrushIndex = prevBrushIndex;
            shared.editBrushStart = shared.editBrushPosition;

            //HelpOverlay.Push(helpOverlayID);
            inGame.Cursor3D.Rep          = Cursor3D.Visual.Pointy;
            inGame.Cursor3D.DiffuseColor = Vector4.One;

            terrainSpeed = Common.Xml.XmlOptionsData.TerrainSpeed; // just cache this.

            isInAction = false;
        }
Example #2
0
        void centerBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this._centerBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this._centerBrush = colorPicker._Brush;
            colorPicker       = null;
        }
        private void fillBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.fillBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this.fillBrush = colorPicker._Brush;
            this.draw();
            colorPicker = null;
        }
Example #4
0
        private void goembrush_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.geomBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.geomBrush = colorPicker._Brush;
            this.UpdateMaterial();
            colorPicker = null;
        }
        void boarderBrush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.pathBrush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this.pathBrush = colorPicker._Brush;
            //this.reDraw();                        /*Do not change the color of the previous pathes*/
            colorPicker = null;
        }
Example #6
0
        private void brush_Menu_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this._brush);

            colorPicker.Owner = this._host;
            colorPicker.ShowDialog();
            this._brush = colorPicker._Brush;
            colorPicker = null;
            if (this._children.Count != 0)
            {
                this.draw();
            }
        }
Example #7
0
        public GraphRedactor(int width, int height, DrawingCanvas drawingCanvas)
        {
            graphData  = new GraphData(width, height, drawingCanvas);
            Uploader   = new Uploader();
            ToolPicker = new ToolPicker();

            BrushPicker.AddBrush(new LinesBrush());
            BrushPicker.AddBrush(new SolidBrush());
            BrushPicker.AddBrush(new CrossBrush());
            BrushPicker.AddBrush(new SecondLinesBrush());

            PenPicker.AddPen(new DashPen());
            PenPicker.AddPen(new SolidPen());
            PenPicker.AddPen(new DashDotDotPen());
        }
Example #8
0
        private void setSurfaceBrush_Click(object sender, RoutedEventArgs e)
        {
            foreach (object item in this.applyColor.Items)
            {
                ((MenuItem)item).IsChecked = false;
            }
            ((MenuItem)sender).IsChecked = true;
            this._clrMode = ColorMode.Solid;
            BrushPicker colorPicker = new BrushPicker(this.surfaceBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.surfaceBrush = colorPicker._Brush;
            this.UpdateMaterial();
            colorPicker = null;
        }
Example #9
0
        private void setModelGeometryBrush_Click(object sender, RoutedEventArgs e)
        {
            BrushPicker colorPicker = new BrushPicker(this.geometryBrush);

            colorPicker.Owner = this;
            colorPicker.ShowDialog();
            this.geometryBrush    = colorPicker._Brush;
            colorPicker           = null;
            this.geometryMaterial = null;
            this.geometryMaterial = new DiffuseMaterial(this.geometryBrush);
            if (this.modelGeometries != null)
            {
                foreach (GeometryModel3D item in this.modelGeometries)
                {
                    item.Material = this.geometryMaterial;
                }
            }
        }