Search in sources :

Example 11 with EditableLabel

use of com.talosvfx.talos.editor.widgets.ui.EditableLabel in project talos by rockbite.

the class AssetListPopup method traversePath.

private void traversePath(FileHandle path, int currDepth, int maxDepth, FilteredTree.Node node) {
    if (path.isDirectory() && currDepth <= maxDepth) {
        FileHandle[] list = path.list(ProjectExplorerWidget.fileFilter);
        for (int i = 0; i < list.length; i++) {
            FileHandle listItemHandle = list[i];
            ProjectExplorerWidget.RowWidget widget = new ProjectExplorerWidget.RowWidget(listItemHandle, false);
            EditableLabel label = widget.getLabel();
            final FilteredTree.Node newNode = new FilteredTree.Node(listItemHandle.path(), widget);
            newNode.setObject(listItemHandle.path());
            node.add(newNode);
            if (listItemHandle.isDirectory()) {
                traversePath(list[i], currDepth++, maxDepth, newNode);
            }
        }
    }
}
Also used : EditableLabel(com.talosvfx.talos.editor.widgets.ui.EditableLabel) FileHandle(com.badlogic.gdx.files.FileHandle) FilteredTree(com.talosvfx.talos.editor.widgets.ui.FilteredTree) SearchFilteredTree(com.talosvfx.talos.editor.widgets.ui.SearchFilteredTree)

Aggregations

EditableLabel (com.talosvfx.talos.editor.widgets.ui.EditableLabel)11 FilteredTree (com.talosvfx.talos.editor.widgets.ui.FilteredTree)6 InputEvent (com.badlogic.gdx.scenes.scene2d.InputEvent)4 Vector2 (com.badlogic.gdx.math.Vector2)3 Actor (com.badlogic.gdx.scenes.scene2d.Actor)3 ClickListener (com.badlogic.gdx.scenes.scene2d.utils.ClickListener)3 FileHandle (com.badlogic.gdx.files.FileHandle)2 Color (com.badlogic.gdx.graphics.Color)2 Skin (com.badlogic.gdx.scenes.scene2d.ui.Skin)2 Table (com.badlogic.gdx.scenes.scene2d.ui.Table)2 Array (com.badlogic.gdx.utils.Array)2 MenuItem (com.kotcrab.vis.ui.widget.MenuItem)2 PopupMenu (com.kotcrab.vis.ui.widget.PopupMenu)2 ColorPickerAdapter (com.kotcrab.vis.ui.widget.color.ColorPickerAdapter)2 InputListener (com.badlogic.gdx.scenes.scene2d.InputListener)1 Image (com.badlogic.gdx.scenes.scene2d.ui.Image)1 ImageButton (com.badlogic.gdx.scenes.scene2d.ui.ImageButton)1 Stack (com.badlogic.gdx.scenes.scene2d.ui.Stack)1 Selection (com.badlogic.gdx.scenes.scene2d.utils.Selection)1 GameObject (com.talosvfx.talos.editor.addons.scene.logic.GameObject)1