Better organization
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
package games.rednblack.editor.graph.actions.producer;
|
||||
|
||||
public class EntityBoxProducer {
|
||||
import games.rednblack.editor.graph.actions.ActionFieldType;
|
||||
import games.rednblack.editor.graph.data.NodeConfiguration;
|
||||
import games.rednblack.editor.graph.producer.GraphBoxProducerImpl;
|
||||
|
||||
public class EntityBoxProducer extends GraphBoxProducerImpl<ActionFieldType> {
|
||||
|
||||
public EntityBoxProducer(NodeConfiguration<ActionFieldType> configuration) {
|
||||
super(configuration);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package games.rednblack.editor.graph.actions.producer.value;
|
||||
package games.rednblack.editor.graph.producer.value;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.InputEvent;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package games.rednblack.editor.graph.actions.producer.value;
|
||||
package games.rednblack.editor.graph.producer.value;
|
||||
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package games.rednblack.editor.graph.actions.producer.value;
|
||||
package games.rednblack.editor.graph.producer.value;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.HorizontalGroup;
|
||||
@@ -11,15 +11,15 @@ import games.rednblack.editor.graph.GraphBox;
|
||||
import games.rednblack.editor.graph.actions.config.value.ValueBooleanNodeConfiguration;
|
||||
import games.rednblack.editor.graph.actions.config.value.ValueColorNodeConfiguration;
|
||||
import games.rednblack.editor.graph.actions.config.value.ValueFloatNodeConfiguration;
|
||||
import games.rednblack.editor.graph.actions.producer.value.ValueBooleanBoxProducer;
|
||||
import games.rednblack.editor.graph.actions.producer.value.ValueColorBoxProducer;
|
||||
import games.rednblack.editor.graph.actions.producer.value.ValueFloatBoxProducer;
|
||||
import games.rednblack.editor.graph.actions.producer.EntityBoxProducer;
|
||||
import games.rednblack.editor.graph.producer.GraphBoxProducer;
|
||||
import games.rednblack.editor.graph.producer.GraphBoxProducerImpl;
|
||||
import games.rednblack.editor.graph.GraphContainer;
|
||||
import games.rednblack.editor.graph.PopupMenuProducer;
|
||||
import games.rednblack.editor.graph.actions.ActionFieldType;
|
||||
import games.rednblack.editor.graph.actions.config.EntityNodeConfiguration;
|
||||
import games.rednblack.editor.graph.producer.value.ValueBooleanBoxProducer;
|
||||
import games.rednblack.editor.graph.producer.value.ValueColorBoxProducer;
|
||||
import games.rednblack.editor.graph.producer.value.ValueFloatBoxProducer;
|
||||
import games.rednblack.editor.view.stage.Sandbox;
|
||||
import games.rednblack.h2d.common.H2DDialog;
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.UUID;
|
||||
public class NodeEditorDialog extends H2DDialog {
|
||||
|
||||
private final GraphContainer<ActionFieldType> graphContainer;
|
||||
GraphBoxProducerImpl<ActionFieldType> entityProducer;
|
||||
|
||||
private final Set<GraphBoxProducer<ActionFieldType>> graphBoxProducers = new LinkedHashSet<>();
|
||||
|
||||
@@ -44,8 +43,6 @@ public class NodeEditorDialog extends H2DDialog {
|
||||
graphBoxProducers.add(new ValueFloatBoxProducer<>(new ValueFloatNodeConfiguration()));
|
||||
graphBoxProducers.add(new ValueBooleanBoxProducer<>(new ValueBooleanNodeConfiguration()));
|
||||
|
||||
entityProducer = new GraphBoxProducerImpl<>(new EntityNodeConfiguration());
|
||||
|
||||
graphContainer = new GraphContainer<>(VisUI.getSkin(), new PopupMenuProducer() {
|
||||
@Override
|
||||
public PopupMenu createPopupMenu(float x, float y) {
|
||||
@@ -53,6 +50,8 @@ public class NodeEditorDialog extends H2DDialog {
|
||||
}
|
||||
});
|
||||
|
||||
EntityBoxProducer entityProducer = new EntityBoxProducer(new EntityNodeConfiguration());
|
||||
|
||||
String id = UUID.randomUUID().toString().replace("-", "");
|
||||
GraphBox<ActionFieldType> graphBox = entityProducer.createDefault(VisUI.getSkin(), id);
|
||||
graphContainer.addGraphBox(graphBox, "Entity", false, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user