Ejemplo n.º 1
0
 HSVShiftNode() : base()
 {
     title       = "HSV Shift";
     style.width = 150f;
     AddInputPort <Vector4>();
     AddOutputPort <Vector4>();
     RefreshPorts();
     m_HueSlider        = new SliderWithFloatField(-0.5f, 0.5f, 0);
     m_SaturationSlider = new SliderWithFloatField(0f, 2f, 1f);
     m_ValueSlider      = new SliderWithFloatField(0f, 2f, 1f);
     extensionContainer.Add(UIElementsUtility.CreateLabeledElement("H", m_HueSlider));
     extensionContainer.Add(UIElementsUtility.CreateLabeledElement("S", m_SaturationSlider));
     extensionContainer.Add(UIElementsUtility.CreateLabeledElement("V", m_ValueSlider));
     RefreshExpandedState();
 }
Ejemplo n.º 2
0
 internal ExportTextureNode() : base()
 {
     title         = "Export Texture";
     capabilities &= ~Capabilities.Deletable;
     AddInputPort <Vector4>("Color");
     RefreshPorts();
     m_WidthPopupField = new PopupField <int>(s_PopupValues, defaultValue: s_PopupValues[6])
     {
         name = "Width"
     };
     m_HeightPopupField = new PopupField <int>(s_PopupValues, defaultValue: s_PopupValues[6])
     {
         name = "Height"
     };
     m_HeightPopupField.SetEnabled(false);
     m_WidthPopupField.OnValueChanged(OnWidthValueChanged);
     extensionContainer.Add(UIElementsUtility.CreateLabeledElement("Width", m_WidthPopupField));
     extensionContainer.Add(UIElementsUtility.CreateLabeledElement("Height", m_HeightPopupField));
     RefreshExpandedState();
 }