private static void DrawNormalizeLayer(Generator tgen, int num) { Normalize200 gen = (Normalize200)tgen; Normalize200.NormalizeLayer layer = gen.layers[num]; if (layer == null) { return; } using (Cell.LinePx(20)) { if (num != 0) { using (Cell.RowPx(0)) GeneratorDraw.DrawInlet(layer, gen); } else //disconnecting last layer inlet if (GraphWindow.current.graph.IsLinked(layer)) { GraphWindow.current.graph.UnlinkInlet(layer); } Cell.EmptyRowPx(10); using (Cell.RowPx(73)) { if (num == 0) { Draw.Label("Background"); } else { Draw.Label("Layer " + num); } } using (Cell.RowPx(10)) Draw.Icon(UI.current.textures.GetTexture("DPUI/Icons/Opacity")); using (Cell.Row) layer.Opacity = Draw.Field(layer.Opacity); Cell.EmptyRowPx(10); using (Cell.RowPx(0)) GeneratorDraw.DrawOutlet(layer); } }
public static void NormalizeGeneratorEditor(Normalize200 gen) { using (Cell.LinePx(20)) GeneratorDraw.DrawLayersAddRemove(gen, ref gen.layers, inversed: true); using (Cell.LinePx(0)) GeneratorDraw.DrawLayersThemselves(gen, gen.layers, inversed: true, layerEditor: DrawNormalizeLayer); }