Search in sources :

Example 1 with ScreenShaderPreviewBoxPart

use of com.gempukku.libgdx.graph.plugin.screen.design.ScreenShaderPreviewBoxPart in project gdx-graph by MarcinSc.

the class EndScreenShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ScreenShaderPreviewBoxPart previewBoxPart = new ScreenShaderPreviewBoxPart();
    previewBoxPart.initialize(data);
    GraphBoxImpl result = new GraphBoxImpl(id, getConfiguration()) {

        @Override
        public void graphChanged(GraphChangedEvent event, boolean hasErrors, Graph<? extends GraphNode, ? extends GraphConnection, ? extends GraphProperty> graph) {
            if (event.isData() || event.isStructure()) {
                previewBoxPart.graphChanged(hasErrors, graph);
            }
        }
    };
    addConfigurationInputsAndOutputs(result);
    result.addGraphBoxPart(new SectionBoxPart("Rendering config"));
    BlendingBoxPart blendingBox = new BlendingBoxPart();
    blendingBox.initialize(data);
    result.addGraphBoxPart(blendingBox);
    result.addGraphBoxPart(new SectionBoxPart("Preview"));
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) Graph(com.gempukku.libgdx.graph.data.Graph) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) ScreenShaderPreviewBoxPart(com.gempukku.libgdx.graph.plugin.screen.design.ScreenShaderPreviewBoxPart) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) BlendingBoxPart(com.gempukku.libgdx.graph.ui.part.BlendingBoxPart) SectionBoxPart(com.gempukku.libgdx.graph.ui.part.SectionBoxPart) GraphNode(com.gempukku.libgdx.graph.data.GraphNode)

Aggregations

Graph (com.gempukku.libgdx.graph.data.Graph)1 GraphConnection (com.gempukku.libgdx.graph.data.GraphConnection)1 GraphNode (com.gempukku.libgdx.graph.data.GraphNode)1 GraphProperty (com.gempukku.libgdx.graph.data.GraphProperty)1 ScreenShaderPreviewBoxPart (com.gempukku.libgdx.graph.plugin.screen.design.ScreenShaderPreviewBoxPart)1 GraphBoxImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl)1 GraphChangedEvent (com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent)1 BlendingBoxPart (com.gempukku.libgdx.graph.ui.part.BlendingBoxPart)1 SectionBoxPart (com.gempukku.libgdx.graph.ui.part.SectionBoxPart)1