use of com.gempukku.libgdx.graph.ui.producer.ValueGraphNodeOutput in project gdx-graph by MarcinSc.
the class PropertyBoxImpl method createPropertyBox.
@Override
public GraphBox createPropertyBox(Skin skin, String id, float x, float y) {
final String name = getName();
GraphBoxImpl result = new GraphBoxImpl(id, new PropertyNodeConfiguration(name, propertyType)) {
@Override
public JsonValue getData() {
JsonValue result = new JsonValue(JsonValue.ValueType.object);
result.addChild("name", new JsonValue(name));
result.addChild("type", new JsonValue(propertyType));
return result;
}
};
result.addOutputGraphPart(new ValueGraphNodeOutput(name, propertyType));
ShaderFieldType shaderFieldType = ShaderFieldTypeRegistry.findShaderFieldType(propertyType);
if (shaderFieldType != null && shaderFieldType.isTexture()) {
result.addGraphBoxPart(new TextureSettingsGraphBoxPart());
}
return result;
}
use of com.gempukku.libgdx.graph.ui.producer.ValueGraphNodeOutput in project gdx-graph by MarcinSc.
the class PropertyShaderGraphBoxProducer method createPipelineGraphBox.
@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
final String name = data.getString("name");
final String propertyType = data.getString("type");
GraphBoxImpl result = new GraphBoxImpl(id, new PropertyNodeConfiguration(name, propertyType)) {
@Override
public JsonValue getData() {
JsonValue result = super.getData();
if (result == null)
result = new JsonValue(JsonValue.ValueType.object);
result.addChild("name", new JsonValue(name));
result.addChild("type", new JsonValue(propertyType));
return result;
}
};
result.addOutputGraphPart(new ValueGraphNodeOutput(name, propertyType));
if (ShaderFieldTypeRegistry.findShaderFieldType(propertyType).isTexture()) {
TextureSettingsGraphBoxPart textureSettings = new TextureSettingsGraphBoxPart();
textureSettings.initialize(data);
result.addGraphBoxPart(textureSettings);
}
return result;
}
use of com.gempukku.libgdx.graph.ui.producer.ValueGraphNodeOutput in project gdx-graph by MarcinSc.
the class PropertyPipelineGraphBoxProducer method createPipelineGraphBox.
@Override
public GraphBox createPipelineGraphBox(Skin skin, String id, JsonValue data) {
final String name = data.getString("name");
final String propertyType = data.getString("type");
GraphBoxImpl result = new GraphBoxImpl(id, new PropertyNodeConfiguration(name, propertyType)) {
@Override
public JsonValue getData() {
JsonValue result = super.getData();
if (result == null)
result = new JsonValue(JsonValue.ValueType.object);
result.addChild("name", new JsonValue(name));
result.addChild("type", new JsonValue(propertyType));
return result;
}
};
result.addOutputGraphPart(new ValueGraphNodeOutput(name, propertyType));
return result;
}
Aggregations