Package org.terasology.rendering.nui.skin

Examples of org.terasology.rendering.nui.skin.UISkin


            }
        });
        assetManager.setAssetFactory(AssetType.UI_SKIN, new AssetFactory<UISkinData, UISkin>() {
            @Override
            public UISkin buildAsset(AssetUri uri, UISkinData data) {
                return new UISkin(uri, data);
            }
        });
        assetManager.setAssetFactory(AssetType.BEHAVIOR, new AssetFactory<BehaviorTreeData, BehaviorTree>() {
            @Override
            public BehaviorTree buildAsset(AssetUri uri, BehaviorTreeData data) {
View Full Code Here


        });

        assetManager.setAssetFactory(AssetType.UI_SKIN, new AssetFactory<UISkinData, UISkin>() {
            @Override
            public UISkin buildAsset(AssetUri uri, UISkinData data) {
                return new UISkin(uri, data);
            }
        });

        assetManager.setAssetFactory(AssetType.SOUND, audioManager.getStaticSoundFactory());
        assetManager.setAssetFactory(AssetType.MUSIC, audioManager.getStreamingSoundFactory());
View Full Code Here

            }
        });
        CoreRegistry.get(AssetManager.class).setAssetFactory(AssetType.UI_SKIN, new AssetFactory<UISkinData, UISkin>() {
            @Override
            public UISkin buildAsset(AssetUri uri, UISkinData data) {
                return new UISkin(uri, data);
            }
        });

        // TODO: move somewhere else
        CoreRegistry.put(ShaderManager.class, new ShaderManagerLwjgl()).initShaders();
View Full Code Here

        List<String> lines = TextLineBuilder.getLines(font, value.getText(), canvas.size().x);
        return font.getSize(lines);
    }

    private UISkin getSkin(TooltipLine value) {
        final UISkin skin = value.getSkin();
        if (skin != null) {
            return skin;
        }
        return defaultSkin;
    }
View Full Code Here

    private UIList<TooltipLine> tooltip;

    public ItemIcon() {
        tooltip = new UIList<>();
        tooltip.setSelectable(false);
        final UISkin defaultSkin = Assets.getSkin("Engine:itemTooltip");
        tooltip.setSkin(defaultSkin);
        tooltip.setItemRenderer(new TooltipLineRenderer(defaultSkin));
        tooltip.bindList(new DefaultBinding<List<TooltipLine>>(new ArrayList<TooltipLine>()));
    }
View Full Code Here

        if (nuiManager.getFocus() == element) {
            focusDrawn = true;
        }
        String family = (element.getFamily() != null) ? element.getFamily() : state.family;
        UISkin skin = (element.getSkin() != null) ? element.getSkin() : state.skin;
        UIStyle newStyle = skin.getStyleFor(family, element.getClass(), UIWidget.BASE_PART, element.getMode());
        Rect2i regionArea;
        try (SubRegion ignored = subRegionForWidget(element, region, false)) {
            regionArea = applyStyleToSize(region, newStyle, calculateMaximumSize(element));
        }
View Full Code Here

TOP

Related Classes of org.terasology.rendering.nui.skin.UISkin

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.