123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- using UnityEngine;
- namespace COM3D2.MeidoPhotoStudio.Plugin
- {
- public class BGWindowPane : BaseMainWindowPane
- {
- private readonly BackgroundSelectorPane backgroundSelectorPane;
- private readonly LightsPane lightsPane;
- private readonly EffectsPane effectsPane;
- private readonly DragPointPane dragPointPane;
- private readonly OtherEffectsPane otherEffectsPane;
- private readonly Button sceneManagerButton;
- public BGWindowPane(
- EnvironmentManager environmentManager, LightManager lightManager, EffectManager effectManager,
- SceneWindow sceneWindow
- )
- {
- sceneManagerButton = new Button(Translation.Get("backgroundWindow", "manageScenesButton"));
- sceneManagerButton.ControlEvent += (s, a) => sceneWindow.Visible = !sceneWindow.Visible;
- backgroundSelectorPane = AddPane(new BackgroundSelectorPane(environmentManager));
- dragPointPane = AddPane(new DragPointPane());
- lightsPane = AddPane(new LightsPane(lightManager));
- effectsPane = AddPane(new EffectsPane()
- {
- ["bloom"] = new BloomPane(effectManager),
- ["dof"] = new DepthOfFieldPane(effectManager),
- ["vignette"] = new VignettePane(effectManager),
- ["fog"] = new FogPane(effectManager)
- });
- otherEffectsPane = AddPane(new OtherEffectsPane(effectManager));
- }
- protected override void ReloadTranslation()
- {
- sceneManagerButton.Label = Translation.Get("backgroundWindow", "manageScenesButton");
- }
- public override void Draw()
- {
- tabsPane.Draw();
- sceneManagerButton.Draw();
- backgroundSelectorPane.Draw();
- dragPointPane.Draw();
- scrollPos = GUILayout.BeginScrollView(scrollPos);
- lightsPane.Draw();
- effectsPane.Draw();
- otherEffectsPane.Draw();
- GUILayout.EndScrollView();
- }
- public override void UpdatePanes()
- {
- if (ActiveWindow) base.UpdatePanes();
- }
- }
- }
|