BGWindowPane.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using UnityEngine;
  2. namespace COM3D2.MeidoPhotoStudio.Plugin
  3. {
  4. internal class BGWindowPane : BaseMainWindowPane
  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(Translation.Get("backgroundWindow", "manageScenesButton"));
  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. protected override void ReloadTranslation()
  30. {
  31. this.sceneManagerButton.Label = Translation.Get("backgroundWindow", "manageScenesButton");
  32. }
  33. public override void Draw()
  34. {
  35. this.tabsPane.Draw();
  36. this.sceneManagerButton.Draw();
  37. this.backgroundSelectorPane.Draw();
  38. this.dragPointPane.Draw();
  39. this.scrollPos = GUILayout.BeginScrollView(this.scrollPos);
  40. this.lightsPane.Draw();
  41. this.effectsPane.Draw();
  42. GUILayout.EndScrollView();
  43. }
  44. public override void UpdatePanes()
  45. {
  46. if (ActiveWindow)
  47. {
  48. base.UpdatePanes();
  49. }
  50. }
  51. }
  52. }