Package org.terasology.rendering.nui.asset

Examples of org.terasology.rendering.nui.asset.UIElement


            }
        });
        assetManager.setAssetFactory(AssetType.UI_ELEMENT, new AssetFactory<UIData, UIElement>() {
            @Override
            public UIElement buildAsset(AssetUri uri, UIData data) {
                return new UIElement(uri, data);
            }
        });

    }
View Full Code Here


    @Override
    public void initialise() {
        nuiManager.getHUD().addHUDElement("toolbar");
        TransferItemCursor cursor = new TransferItemCursor();
        UIElement cursorElement = Assets.generateAsset(new AssetUri(AssetType.UI_ELEMENT, "engine:transferItemCursor"), new UIData(cursor), UIElement.class);
        nuiManager.addOverlay(cursorElement, ControlWidget.class);
    }
View Full Code Here

        toggleScreen(element.getURI());
    }

    @Override
    public UIScreenLayer pushScreen(AssetUri screenUri) {
        UIElement element = Assets.get(screenUri, UIElement.class);
        return pushScreen(element);
    }
View Full Code Here

        return pushScreen(element);
    }

    @Override
    public UIScreenLayer pushScreen(String screenUri) {
        UIElement element = Assets.getUIElement(screenUri);
        if (element != null) {
            return pushScreen(element);
        }
        return null;
    }
View Full Code Here

        }
    }

    @Override
    public <T extends ControlWidget> T addOverlay(String screenUri, Class<T> expectedType) {
        UIElement element = Assets.getUIElement(screenUri);
        return addOverlay(element, expectedType);
    }
View Full Code Here

        return addOverlay(element, expectedType);
    }

    @Override
    public <T extends ControlWidget> T addOverlay(AssetUri screenUri, Class<T> expectedType) {
        UIElement element = Assets.get(screenUri, UIElement.class);
        return addOverlay(element, expectedType);
    }
View Full Code Here

TOP

Related Classes of org.terasology.rendering.nui.asset.UIElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.