|
@@ -55,28 +55,41 @@ public class LightsPane : BasePane
|
|
public LightsPane(LightManager lightManager)
|
|
public LightsPane(LightManager lightManager)
|
|
{
|
|
{
|
|
this.lightManager = lightManager;
|
|
this.lightManager = lightManager;
|
|
- this.lightManager.Rotate += (s, a) => UpdateRotation();
|
|
|
|
- this.lightManager.Scale += (s, a) => UpdateScale();
|
|
|
|
- this.lightManager.Select += (s, a) => UpdateCurrentLight();
|
|
|
|
- this.lightManager.ListModified += (s, a) => UpdateList();
|
|
|
|
|
|
+ this.lightManager.Rotate += (s, a) =>
|
|
|
|
+ UpdateRotation();
|
|
|
|
+
|
|
|
|
+ this.lightManager.Scale += (s, a) =>
|
|
|
|
+ UpdateScale();
|
|
|
|
+
|
|
|
|
+ this.lightManager.Select += (s, a) =>
|
|
|
|
+ UpdateCurrentLight();
|
|
|
|
+
|
|
|
|
+ this.lightManager.ListModified += (s, a) =>
|
|
|
|
+ UpdateList();
|
|
|
|
|
|
lightTypeGrid = new(Translation.GetArray("lightType", lightTypes));
|
|
lightTypeGrid = new(Translation.GetArray("lightType", lightTypes));
|
|
- lightTypeGrid.ControlEvent += (s, a) => SetCurrentLightType();
|
|
|
|
|
|
+ lightTypeGrid.ControlEvent += (s, a) =>
|
|
|
|
+ SetCurrentLightType();
|
|
|
|
|
|
lightDropdown = new(new[] { "Main" });
|
|
lightDropdown = new(new[] { "Main" });
|
|
- lightDropdown.SelectionChange += (s, a) => SetCurrentLight();
|
|
|
|
|
|
+ lightDropdown.SelectionChange += (s, a) =>
|
|
|
|
+ SetCurrentLight();
|
|
|
|
|
|
addLightButton = new("+");
|
|
addLightButton = new("+");
|
|
- addLightButton.ControlEvent += (s, a) => lightManager.AddLight();
|
|
|
|
|
|
+ addLightButton.ControlEvent += (s, a) =>
|
|
|
|
+ lightManager.AddLight();
|
|
|
|
|
|
deleteLightButton = new(Translation.Get("lightsPane", "delete"));
|
|
deleteLightButton = new(Translation.Get("lightsPane", "delete"));
|
|
- deleteLightButton.ControlEvent += (s, a) => lightManager.DeleteActiveLight();
|
|
|
|
|
|
+ deleteLightButton.ControlEvent += (s, a) =>
|
|
|
|
+ lightManager.DeleteActiveLight();
|
|
|
|
|
|
disableToggle = new(Translation.Get("lightsPane", "disable"));
|
|
disableToggle = new(Translation.Get("lightsPane", "disable"));
|
|
- disableToggle.ControlEvent += (s, a) => lightManager.CurrentLight.IsDisabled = disableToggle.Value;
|
|
|
|
|
|
+ disableToggle.ControlEvent += (s, a) =>
|
|
|
|
+ lightManager.CurrentLight.IsDisabled = disableToggle.Value;
|
|
|
|
|
|
clearLightsButton = new(Translation.Get("lightsPane", "clear"));
|
|
clearLightsButton = new(Translation.Get("lightsPane", "clear"));
|
|
- clearLightsButton.ControlEvent += (s, a) => ClearLights();
|
|
|
|
|
|
+ clearLightsButton.ControlEvent += (s, a) =>
|
|
|
|
+ ClearLights();
|
|
|
|
|
|
var numberOfLightProps = Enum.GetNames(typeof(LightProp)).Length;
|
|
var numberOfLightProps = Enum.GetNames(typeof(LightProp)).Length;
|
|
|
|
|
|
@@ -93,21 +106,26 @@ public class LightsPane : BasePane
|
|
};
|
|
};
|
|
|
|
|
|
if (lightProp <= LightProp.LightRotY)
|
|
if (lightProp <= LightProp.LightRotY)
|
|
- slider.ControlEvent += (s, a) => SetLightRotation();
|
|
|
|
|
|
+ slider.ControlEvent += (s, a) =>
|
|
|
|
+ SetLightRotation();
|
|
else
|
|
else
|
|
- slider.ControlEvent += (s, a) => SetLightProp(lightProp, slider.Value);
|
|
|
|
|
|
+ slider.ControlEvent += (s, a) =>
|
|
|
|
+ SetLightProp(lightProp, slider.Value);
|
|
|
|
|
|
lightSlider[lightProp] = slider;
|
|
lightSlider[lightProp] = slider;
|
|
}
|
|
}
|
|
|
|
|
|
colorToggle = new(Translation.Get("lightsPane", "colour"));
|
|
colorToggle = new(Translation.Get("lightsPane", "colour"));
|
|
- colorToggle.ControlEvent += (s, a) => SetColourMode();
|
|
|
|
|
|
+ colorToggle.ControlEvent += (s, a) =>
|
|
|
|
+ SetColourMode();
|
|
|
|
|
|
resetPropsButton = new(Translation.Get("lightsPane", "resetProperties"));
|
|
resetPropsButton = new(Translation.Get("lightsPane", "resetProperties"));
|
|
- resetPropsButton.ControlEvent += (s, a) => ResetLightProps();
|
|
|
|
|
|
+ resetPropsButton.ControlEvent += (s, a) =>
|
|
|
|
+ ResetLightProps();
|
|
|
|
|
|
resetPositionButton = new(Translation.Get("lightsPane", "resetPosition"));
|
|
resetPositionButton = new(Translation.Get("lightsPane", "resetPosition"));
|
|
- resetPositionButton.ControlEvent += (s, a) => lightManager.CurrentLight.ResetLightPosition();
|
|
|
|
|
|
+ resetPositionButton.ControlEvent += (s, a) =>
|
|
|
|
+ lightManager.CurrentLight.ResetLightPosition();
|
|
|
|
|
|
lightHeader = Translation.Get("lightsPane", "header");
|
|
lightHeader = Translation.Get("lightsPane", "header");
|
|
resetLabel = Translation.Get("lightsPane", "resetLabel");
|
|
resetLabel = Translation.Get("lightsPane", "resetLabel");
|