-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Following our quick chat on Twitter, please see a standalone example below:
Maven dep coordinates:
<dependency>
<groupId>com.github.almasb</groupId>
<artifactId>fxgl</artifactId>
<version>11.17</version>
</dependency>
Example:
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.app.GameSettings;
import com.almasb.fxgl.dsl.FXGL;
import javafx.scene.text.Text;
public class UISample extends GameApplication {
@Override
protected void initSettings(GameSettings settings) { }
@Override
protected void initUI() {
Text uiText = new Text("Hello World");
FXGL.addUINode(uiText, 100, 100);
}
public static void main(String[] args) {
launch(args);
}
}
The example, when executed, will open a 800x600 window with "Hello World" text.
Metadata
Metadata
Assignees
Labels
No labels