Search in sources :

Example 1 with EditorComponent

use of de.gurkenlabs.utiliti.components.EditorComponent in project litiengine by gurkenlabs.

the class EditorScreen method changeComponent.

public void changeComponent(EditorComponent.ComponentType type) {
    if (this.current != null) {
        this.current.suspend();
        this.getComponents().remove(this.current);
    }
    for (EditorComponent comp : this.comps) {
        if (comp.getComponentType() == type) {
            this.current = comp;
            this.current.prepare();
            this.getComponents().add(this.current);
            break;
        }
    }
}
Also used : EditorComponent(de.gurkenlabs.utiliti.components.EditorComponent)

Aggregations

EditorComponent (de.gurkenlabs.utiliti.components.EditorComponent)1