Search in sources :

Example 1 with EnumSelectBoxPart

use of com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart in project gdx-graph by MarcinSc.

the class EndShadowShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ModelShaderPreviewBoxPart previewBoxPart = new ModelShaderPreviewBoxPart();
    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);
            }
        }
    };
    SelectBoxPart positionType = new SelectBoxPart("Position", "positionType", "Object space", "World space");
    positionType.initialize(data);
    result.addGraphBoxPart(positionType);
    addConfigurationInputsAndOutputs(result);
    EnumSelectBoxPart cullingBox = new EnumSelectBoxPart("Culling", "culling", new StringifyEnum<BasicShader.Culling>(), BasicShader.Culling.values());
    cullingBox.initialize(data);
    result.addGraphBoxPart(cullingBox);
    EnumSelectBoxPart depthTestBox = new EnumSelectBoxPart("DepthTest", "depthTest", new StringifyEnum<BasicShader.DepthTesting>(), BasicShader.DepthTesting.values());
    depthTestBox.initialize(data);
    result.addGraphBoxPart(depthTestBox);
    CheckboxBoxPart writeDepthBox = new CheckboxBoxPart("Write depth", "depthWrite");
    writeDepthBox.initialize(data);
    result.addGraphBoxPart(writeDepthBox);
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) CheckboxBoxPart(com.gempukku.libgdx.graph.ui.part.CheckboxBoxPart) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart) SelectBoxPart(com.gempukku.libgdx.graph.ui.part.SelectBoxPart) GraphNode(com.gempukku.libgdx.graph.data.GraphNode) ModelShaderPreviewBoxPart(com.gempukku.libgdx.graph.plugin.models.design.producer.ModelShaderPreviewBoxPart) GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) Graph(com.gempukku.libgdx.graph.data.Graph) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart)

Example 2 with EnumSelectBoxPart

use of com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart in project gdx-graph by MarcinSc.

the class ModelShaderRendererBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    addConfigurationInputsAndOutputs(result);
    EnumSelectBoxPart renderOrderSelect = new EnumSelectBoxPart("Render order", "renderOrder", new ToStringEnum<RenderOrder>(), RenderOrder.values());
    renderOrderSelect.initialize(data);
    result.addGraphBoxPart(renderOrderSelect);
    ModelShadersBoxPart graphBoxPart = new ModelShadersBoxPart();
    graphBoxPart.initialize(data);
    result.addGraphBoxPart(graphBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart) RenderOrder(com.gempukku.libgdx.graph.pipeline.RenderOrder)

Example 3 with EnumSelectBoxPart

use of com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart in project gdx-graph by MarcinSc.

the class ShadowShaderRendererBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    addConfigurationInputsAndOutputs(result);
    EnumSelectBoxPart renderOrderSelect = new EnumSelectBoxPart("Render order", "renderOrder", new ToStringEnum<RenderOrder>(), RenderOrder.values());
    renderOrderSelect.initialize(data);
    result.addGraphBoxPart(renderOrderSelect);
    StringBoxPart envId = new StringBoxPart("Env id: ", "id");
    envId.initialize(data);
    result.addGraphBoxPart(envId);
    ShadowShadersBoxPart graphBoxPart = new ShadowShadersBoxPart();
    graphBoxPart.initialize(data);
    result.addGraphBoxPart(graphBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) EnumSelectBoxPart(com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart) StringBoxPart(com.gempukku.libgdx.graph.ui.part.StringBoxPart) RenderOrder(com.gempukku.libgdx.graph.pipeline.RenderOrder)

Aggregations

GraphBoxImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl)3 EnumSelectBoxPart (com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart)3 RenderOrder (com.gempukku.libgdx.graph.pipeline.RenderOrder)2 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 ModelShaderPreviewBoxPart (com.gempukku.libgdx.graph.plugin.models.design.producer.ModelShaderPreviewBoxPart)1 GraphChangedEvent (com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent)1 CheckboxBoxPart (com.gempukku.libgdx.graph.ui.part.CheckboxBoxPart)1 SelectBoxPart (com.gempukku.libgdx.graph.ui.part.SelectBoxPart)1 StringBoxPart (com.gempukku.libgdx.graph.ui.part.StringBoxPart)1