Skip to content
Snippets Groups Projects
Verified Commit 54b0cad9 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Display message in splash screen

parent 4ed8f65c
No related branches found
No related tags found
1 merge request!5Resolve "Splash screen scene"
Pipeline #7389 failed
......@@ -21,6 +21,14 @@ class SplashScene extends BaseScene {
this.load.image('logo', logo);
}
init(data) {
if (typeof data.message === 'undefined') {
this.message = 'Loading...';
} else {
this.message = data.message;
}
}
create() {
let width = this.cameras.main.displayWidth;
let height = this.cameras.main.displayHeight;
......@@ -32,6 +40,9 @@ class SplashScene extends BaseScene {
this.textCopyright = this.add.text(width - margin, height - margin, '© 2021 Dominik George & Aug[m]entile contributors\nLicensed under the Apache License 2.0 or newer');
this.textCopyright.setOrigin(1, 1);
this.textMessage = this.add.text(width / 2, height - height / 4, this.message);
this.textMessage.setOrigin(0.5, .5);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment