// c'tor
 public MouseEditToolBox()
 {
     // Create the tool helpers.
     materialPicker = new MaterialPicker(
         delegate(int index) { Terrain.CurrentMaterialIndex = Terrain.UISlotToMatIndex(index); },
         delegate() { return(Terrain.MaterialIndexToUISlot(Terrain.CurrentMaterialIndex)); }
         );
     waterPicker = new WaterPicker(
         delegate(int index) { Water.CurrentType = index; },
         delegate() { return(Water.CurrentType); }
         );
     brushPicker = new BrushPicker();
 }   // end of MouseEditToolBox c'tor
        public void Render()
        {
            if (active)
            {
                // Render the tool add-ons.
                MaterialPicker.Render(camera);
                WaterPicker.Render(camera);
                BrushPicker.Render(camera);

                // We need to render this since the slider input device may be active.
                EditObjectsToolInstance.Render(camera);
                EditPathsToolInstance.Render(camera);
            }
        }   // end of MouseEditToolBox Render()
        }   // end of MouseEditToolBox c'tor

        /// <summary>
        /// Update for the toolbox and its tools.
        /// </summary>
        /// <param name="hovering">Is the user hovering over the toolbar?  If so, don't update the active tool.</param>
        public void Update(bool hovering)
        {
            if (active)
            {
                if (!hovering)
                {
                    // Update the active tool.
                    activeTool.Update(camera);
                }

                // Update the tool add-ons.
                BrushPicker.Update(camera);
                MaterialPicker.Update(camera);
                WaterPicker.Update(camera);

                // Keeep camera in sync with window size.
                camera.Resolution = new Point((int)BokuGame.ScreenSize.X, (int)BokuGame.ScreenSize.Y);
                camera.Update();
            } // end if active
        }     // end of MouseEditToolBox Update()