} // 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 (AuthUI.IsModalActive) { return; } // Keep camera in sync with window size. camera.Resolution = new Point((int)BokuGame.ScreenSize.X, (int)BokuGame.ScreenSize.Y); camera.Update(); if (!hovering) { // Update the active tool. activeTool.Update(camera); } // Update the tool add-ons. brushPicker.Update(camera); materialPicker.Update(camera); waterPicker.Update(camera); } // end if active } // end of MouseEditToolBox Update()
} // end of ToolBox c'tor public void Update() { if (active) { // Update the active tool. activeTool.Update(); // Update the tool add-ons. brushPicker.Update(camera); materialPicker.Update(camera); waterPicker.Update(camera); // Keep 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 ToolBox Update()
} // end of Deactivate() public void Update() { touchedThisFrame = false; if (active) { InGame.SetViewportToScreen(); camera.Resolution = new Point((int)BokuGame.ScreenSize.X, (int)BokuGame.ScreenSize.Y); camera.Recalc(); camera.Update(); Matrix matrix = Matrix.Identity; brightnessSlider.Update(ref matrix); durationSlider.Update(ref matrix); ledGrid.Update(ref matrix); bar.Update(ref matrix); switch (GamePadInput.ActiveMode) { case GamePadInput.InputMode.GamePad: HandleGamePad(); break; case GamePadInput.InputMode.Touch: HandleTouch(); break; case GamePadInput.InputMode.KeyboardMouse: HandleMouse(); break; } // Adjust alpha value for stick icons if needed. float targetAlpha = GamePadInput.ActiveMode == GamePadInput.InputMode.GamePad ? 1.0f : 0.0f; if (targetAlpha != _stickAlpha) { _stickAlpha = targetAlpha; TwitchManager.Set <float> set = delegate(float value, Object param) { stickAlpha = value; }; TwitchManager.CreateTwitch <float>(stickAlpha, _stickAlpha, set, 0.2f, TwitchCurve.Shape.EaseOut); } // touchedThisFrame = true; } } // end of Update()