Search in sources :

Example 11 with GraphBoxImpl

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

the class EndParticlesShaderBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    final ParticlesShaderPreviewBoxPart previewBoxPart = new ParticlesShaderPreviewBoxPart();
    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);
            }
        }
    };
    IntegerBoxPart particleCountBox = new IntegerBoxPart("Max particles ", "maxParticles", 100, new Validators.GreaterThanValidator(0, false));
    particleCountBox.initialize(data);
    result.addGraphBoxPart(particleCountBox);
    addConfigurationInputsAndOutputs(result);
    result.addGraphBoxPart(new SectionBoxPart("Rendering config"));
    EnumSelectBoxPart cullingBox = new EnumSelectBoxPart("Culling", "culling", new StringifyEnum<BasicShader.Culling>(), BasicShader.Culling.values());
    cullingBox.initialize(data);
    result.addGraphBoxPart(cullingBox);
    BlendingBoxPart blendingBox = new BlendingBoxPart();
    blendingBox.initialize(data);
    result.addGraphBoxPart(blendingBox);
    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(new SectionBoxPart("Preview"));
    result.addGraphBoxPart(previewBoxPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) GraphChangedEvent(com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent) GraphNode(com.gempukku.libgdx.graph.data.GraphNode) GraphProperty(com.gempukku.libgdx.graph.data.GraphProperty) Graph(com.gempukku.libgdx.graph.data.Graph) GraphConnection(com.gempukku.libgdx.graph.data.GraphConnection) Validators(com.kotcrab.vis.ui.util.Validators)

Example 12 with GraphBoxImpl

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

the class DirectionalLightBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    StringBoxPart envId = new StringBoxPart("Env id: ", "id");
    envId.initialize(data);
    result.addGraphBoxPart(envId);
    addConfigurationInputsAndOutputs(result);
    IndexBoxPart indexPart = new IndexBoxPart("Index", "index");
    indexPart.initialize(data);
    result.addGraphBoxPart(indexPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) StringBoxPart(com.gempukku.libgdx.graph.ui.part.StringBoxPart) IndexBoxPart(com.gempukku.libgdx.graph.ui.part.IndexBoxPart)

Example 13 with GraphBoxImpl

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

the class ShadowBlinnPhongLightingBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    StringBoxPart envId = new StringBoxPart("Env id: ", "id");
    envId.initialize(data);
    result.addGraphBoxPart(envId);
    addConfigurationInputsAndOutputs(result);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) StringBoxPart(com.gempukku.libgdx.graph.ui.part.StringBoxPart)

Example 14 with GraphBoxImpl

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

the class SpotlightBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    StringBoxPart envId = new StringBoxPart("Env id: ", "id");
    envId.initialize(data);
    result.addGraphBoxPart(envId);
    addConfigurationInputsAndOutputs(result);
    IndexBoxPart indexPart = new IndexBoxPart("Index", "index");
    indexPart.initialize(data);
    result.addGraphBoxPart(indexPart);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) StringBoxPart(com.gempukku.libgdx.graph.ui.part.StringBoxPart) IndexBoxPart(com.gempukku.libgdx.graph.ui.part.IndexBoxPart)

Example 15 with GraphBoxImpl

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

the class RenderCallbackBoxProducer method createPipelineGraphBox.

@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
    GraphBoxImpl result = createGraphBox(id);
    StringBoxPart callbackId = new StringBoxPart("Callback id: ", "callbackId");
    callbackId.initialize(data);
    result.addGraphBoxPart(callbackId);
    addConfigurationInputsAndOutputs(result);
    return result;
}
Also used : GraphBoxImpl(com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl) StringBoxPart(com.gempukku.libgdx.graph.ui.part.StringBoxPart)

Aggregations

GraphBoxImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxImpl)33 StringBoxPart (com.gempukku.libgdx.graph.ui.part.StringBoxPart)10 JsonValue (com.badlogic.gdx.utils.JsonValue)7 GraphChangedEvent (com.gempukku.libgdx.graph.ui.graph.GraphChangedEvent)6 Graph (com.gempukku.libgdx.graph.data.Graph)4 GraphConnection (com.gempukku.libgdx.graph.data.GraphConnection)4 GraphNode (com.gempukku.libgdx.graph.data.GraphNode)4 GraphProperty (com.gempukku.libgdx.graph.data.GraphProperty)4 IndexBoxPart (com.gempukku.libgdx.graph.ui.part.IndexBoxPart)4 SelectBoxPart (com.gempukku.libgdx.graph.ui.part.SelectBoxPart)4 PropertyNodeConfiguration (com.gempukku.libgdx.graph.config.PropertyNodeConfiguration)3 GraphBoxPartImpl (com.gempukku.libgdx.graph.ui.graph.GraphBoxPartImpl)3 CheckboxBoxPart (com.gempukku.libgdx.graph.ui.part.CheckboxBoxPart)3 EnumSelectBoxPart (com.gempukku.libgdx.graph.ui.part.EnumSelectBoxPart)3 ValueGraphNodeOutput (com.gempukku.libgdx.graph.ui.producer.ValueGraphNodeOutput)3 VisTable (com.kotcrab.vis.ui.widget.VisTable)3 Actor (com.badlogic.gdx.scenes.scene2d.Actor)2 ChangeListener (com.badlogic.gdx.scenes.scene2d.utils.ChangeListener)2 RenderOrder (com.gempukku.libgdx.graph.pipeline.RenderOrder)2 ClampMethod (com.gempukku.libgdx.graph.shader.ClampMethod)2