Package org.terasology.rendering.nui

Examples of org.terasology.rendering.nui.NUIManager


                JoinStatus joinStatus = networkSystem.join(address, port);
                return joinStatus;
            }
        };

        final NUIManager manager = CoreRegistry.get(NUIManager.class);
        final WaitPopup<JoinStatus> popup = manager.pushScreen(WaitPopup.ASSET_URI, WaitPopup.class);
        popup.setMessage("Join Game", "Connecting to '" + address + ":" + port + "' - please wait ...");
        popup.onSuccess(new Function<JoinStatus, Void>() {

            @Override
            public Void apply(JoinStatus result) {
                GameEngine engine = CoreRegistry.get(GameEngine.class);
                if (result.getStatus() != JoinStatus.Status.FAILED) {
                    engine.changeState(new StateLoading(result));
                } else {
                    MessagePopup screen = manager.pushScreen(MessagePopup.ASSET_URI, MessagePopup.class);
                    screen.setMessage("Failed to Join", "Could not connect to server - " + result.getErrorMessage());
                }

                return null;
            }
View Full Code Here


                                                        CoreRegistry.get(ReflectFactory.class), CoreRegistry.get(CopyStrategyLibrary.class));

        eventSystem = CoreRegistry.get(EventSystem.class);
        CoreRegistry.put(Console.class, new ConsoleImpl());

        NUIManager nuiManager = CoreRegistry.get(NUIManager.class);
        ((NUIManagerInternal) nuiManager).refreshWidgetsLibrary();

        componentSystemManager = new ComponentSystemManager();
        CoreRegistry.put(ComponentSystemManager.class, componentSystemManager);
View Full Code Here

        Mouse.setGrabbed(false);
    }

    @Override
    public void preUpdate(GameState currentState, float delta) {
        NUIManager nuiManager = CoreRegistry.get(NUIManager.class);
        GameEngine engine = CoreRegistry.get(GameEngine.class);

        // TODO: this originally occurred before GameThread.processWaitingProcesses();
        boolean newGrabbed = engine.hasMouseFocus() && !(nuiManager.isReleasingMouse());
        if (newGrabbed != mouseGrabbed) {
            Mouse.setGrabbed(newGrabbed);
            mouseGrabbed = newGrabbed;
        }
    }
View Full Code Here

    private void updatePreview() {
        previewImage.setVisible(false);
        errorLabel.setVisible(false);

        final NUIManager manager = CoreRegistry.get(NUIManager.class);
        final WaitPopup<ByteBufferResult> popup = manager.pushScreen(WaitPopup.ASSET_URI, WaitPopup.class);
        popup.setMessage("Updating Preview", "Please wait ...");

        final ByteBufferProgressListener progressListener = new ByteBufferProgressListener() {
            @Override
            public void onProgress(float progress) {
View Full Code Here

    @Override
    public boolean step() {
        CoreRegistry.get(ShaderManager.class).initShaders();

        NUIManager nuiManager = CoreRegistry.get(NUIManager.class);
        ((NUIManagerInternal) nuiManager).refreshWidgetsLibrary();

        // TODO: This should be elsewhere
        // Create gelatinousCubeMesh
        Tessellator tessellator = new Tessellator();
View Full Code Here

    private static final Logger logger = LoggerFactory.getLogger(UILoader.class);


    @Override
    public UIData load(Module module, InputStream stream, List<URL> urls, List<URL> deltas) throws IOException {
        NUIManager nuiManager = CoreRegistry.get(NUIManager.class);
        ReflectFactory reflectFactory = CoreRegistry.get(ReflectFactory.class);
        CopyStrategyLibrary copyStrategyLibrary = CoreRegistry.get(CopyStrategyLibrary.class);

        // TODO: Get this library from elsewhere
        TypeSerializationLibrary library = new TypeSerializationLibrary(reflectFactory, copyStrategyLibrary);
View Full Code Here

TOP

Related Classes of org.terasology.rendering.nui.NUIManager

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.