BGWindowPane.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. using UnityEngine;
  2. namespace COM3D2.MeidoPhotoStudio.Plugin
  3. {
  4. internal class BGWindowPane : BaseWindowPane
  5. {
  6. private BackgroundSelectorPane backgroundSelectorPane;
  7. private LightsPane lightsPane;
  8. private EffectsPane effectsPane;
  9. private DragPointPane dragPointPane;
  10. private Button sceneManagerButton;
  11. public BGWindowPane(
  12. EnvironmentManager environmentManager, LightManager lightManager, EffectManager effectManager,
  13. SceneWindow sceneWindow
  14. )
  15. {
  16. this.sceneManagerButton = new Button("Manage Scenes");
  17. this.sceneManagerButton.ControlEvent += (s, a) => sceneWindow.Visible = !sceneWindow.Visible;
  18. this.backgroundSelectorPane = AddPane(new BackgroundSelectorPane(environmentManager));
  19. this.dragPointPane = AddPane(new DragPointPane());
  20. this.lightsPane = AddPane(new LightsPane(lightManager));
  21. this.effectsPane = AddPane(new EffectsPane()
  22. {
  23. ["bloom"] = new BloomPane(effectManager),
  24. ["dof"] = new DepthOfFieldPane(effectManager),
  25. ["vignette"] = new VignettePane(effectManager),
  26. ["fog"] = new FogPane(effectManager)
  27. });
  28. }
  29. public override void Draw()
  30. {
  31. this.sceneManagerButton.Draw();
  32. this.backgroundSelectorPane.Draw();
  33. this.dragPointPane.Draw();
  34. this.scrollPos = GUILayout.BeginScrollView(this.scrollPos);
  35. this.lightsPane.Draw();
  36. this.effectsPane.Draw();
  37. GUILayout.EndScrollView();
  38. }
  39. public override void UpdatePanes()
  40. {
  41. if (ActiveWindow)
  42. {
  43. base.UpdatePanes();
  44. }
  45. }
  46. }
  47. }