BGWindowPane.cs 1.7 KB

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