terasology / tutorialnui Goto Github PK
View Code? Open in Web Editor NEWA series of tutorials for the NUI interface framework.
A series of tutorials for the NUI interface framework.
Added in MovingBlocks/Terasology#2808 and included on the migTestScreen
but we should cover it here as well.
Goes with MovingBlocks/Terasology#2721 - it would be great to have an example of and a wiki chapter on this new widget!
See the page: TutorialNui Quick Start
When going through this quick introduction to NUI, it seems that the screen does not open at the first time the tutorial suggests you open it with showScreen environmentInfoScreen
.
Follow the tutorial to set up the TutorialNui module, create the .ui file, and create the java class for your screen. Then, at the Step 2 header, when you try to open the screen, it won't open because of a NullPointerException.
ERROR o.t.logic.console.ConsoleImpl - An error occurred while executing a command
org.terasology.logic.console.commandSystem.exceptions.CommandExecutionException: java.lang.NullPointerException
at org.terasology.logic.console.commandSystem.AbstractCommand.execute(AbstractCommand.java:242)
at org.terasology.logic.console.ConsoleImpl.execute(ConsoleImpl.java:264)
at org.terasology.logic.console.ConsoleImpl.execute(ConsoleImpl.java:228)
at org.terasology.logic.console.ui.ConsoleScreen.lambda$initialise$0(ConsoleScreen.java:79)
at org.terasology.rendering.nui.widgets.UIText.onKeyEvent(UIText.java:486)
at org.terasology.logic.console.ui.UICommandEntry.onKeyEvent(UICommandEntry.java:83)
at org.terasology.rendering.nui.internal.NUIManagerInternal.keyEvent(NUIManagerInternal.java:648)
at org.terasology.rendering.nui.internal.NUIManagerInternalMethodAccess.invoke(Unknown Source)
at org.terasology.entitySystem.event.internal.EventSystemImpl$ByteCodeEventHandlerInfo.invoke(EventSystemImpl.java:531)
at org.terasology.entitySystem.event.internal.EventSystemImpl.sendConsumableEvent(EventSystemImpl.java:301)
at org.terasology.entitySystem.event.internal.EventSystemImpl.send(EventSystemImpl.java:280)
at org.terasology.entitySystem.entity.internal.BaseEntityRef.send(BaseEntityRef.java:205)
at org.terasology.input.InputSystem.send(InputSystem.java:503)
at org.terasology.input.InputSystem.sendKeyEvent(InputSystem.java:447)
at org.terasology.input.InputSystem.processKeyboardInput(InputSystem.java:382)
at org.terasology.input.InputSystem.update(InputSystem.java:135)
at org.terasology.engine.modes.StateIngame.handleInput(StateIngame.java:192)
at org.terasology.engine.subsystem.lwjgl.LwjglInput.postUpdate(LwjglInput.java:55)
at org.terasology.engine.TerasologyEngine.tick(TerasologyEngine.java:473)
at org.terasology.engine.TerasologyEngine.mainLoop(TerasologyEngine.java:427)
at org.terasology.engine.TerasologyEngine.run(TerasologyEngine.java:403)
at org.terasology.engine.Terasology.main(Terasology.java:163)
Caused by: java.lang.NullPointerException: null
at org.terasology.rendering.nui.internal.NUIManagerInternal.createScreen(NUIManagerInternal.java:313)
at org.terasology.rendering.nui.internal.NUIManagerInternal.createScreen(NUIManagerInternal.java:289)
at org.terasology.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:340)
at org.terasology.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:335)
at org.terasology.rendering.nui.internal.NUIManagerInternal.pushScreen(NUIManagerInternal.java:78)
at org.terasology.logic.console.commands.CoreCommands.showScreen(CoreCommands.java:321)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.terasology.logic.console.commandSystem.AbstractCommand.execute(AbstractCommand.java:237)
... 21 common frames omitted
Added by MovingBlocks/Terasology#2543 and already present on the migTestScreen
We have an HTML parser and browser widget in org.terasology.rendering.nui.widgets.browser
which is being used in just a few places like Books, Dialogs, InGameHelp, Journal, and ModularComputers. But other than actual code I don't think we have any docs or tutorial coverage for that system, yet it sounds like the sort of thing we should highlight with a chapter in this tutorial's wiki.
Am also wondering if that should actually be in the engine or get moved to the NUI repo? ๐ค It actually appears to be the only thing left in the widgets
package, other than a button variant meant to open a link in a browser.
Extracted out of MovingBlocks/Terasology#1975 and originally came in with MovingBlocks/Terasology#1817
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.