Skip to content
Snippets Groups Projects
Commit 7300ee2b authored by Benedict Suska's avatar Benedict Suska
Browse files

Add login layout

parent 52c4e3a4
No related branches found
No related tags found
1 merge request!6Resolve "Login scene for browser backend"
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg8"
inkscape:export-filename="/home/benedict/Rastergrafik.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
sodipodi:docname="loginbutton.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.35"
inkscape:cx="-708.53966"
inkscape:cy="232.98338"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1014"
inkscape:window-x="0"
inkscape:window-y="150"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Ebene 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="fill:#f9f9f9;stroke-width:0.264583"
id="rect20"
width="49.148903"
height="19.463789"
x="69.17868"
y="65.184608" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.264583"
x="85.404808"
y="78.534752"
id="text24"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"><tspan
sodipodi:role="line"
id="tspan22"
x="85.404808"
y="78.534752"
style="stroke-width:0.264583">Login</tspan></text>
</g>
</svg>
......@@ -15,22 +15,43 @@
import BaseScene from './base';
import logo from '../../artwork/augmentile.svg';
import loginbutton from '../../artwork/loginbutton.svg';
class LoginScene extends BaseScene {
preload() {
this.load.image('logo', logo);
this.load.image('login', loginbutton);
}
create() {
//this.add.image(this.cameras.main.centerX, this.cameras.main.centerY, 'logo');
let width = this.cameras.main.displayWidth;
let height = this.cameras.main.displayHeight;
let margin = 20;
const textUserName = this.add.text(400, 300, 'Username', { fixedWidth: 150, fixedHeight: 36 });
const textUserName = this.add.text(width / 2, height / 2, 'Username', { fixedWidth: 150, fixedHeight: 36 });
textUserName.setOrigin(0.5, 0.5);
textUserName.setInteractive().on('pointerdown', function() {
console.log(this);
this.scene.rexUI.edit(textUserName);
});
}
const textPassword = this.add.text(width / 2, height / 2 + 20, 'Password', { fixedWidth: 150, fixedHeight: 36 });
textPassword.setOrigin(0.5, 0.5);
textPassword.setInteractive().on('pointerdown', function() {
console.log(this);
this.scene.rexUI.edit(textPassword);
});
const textServer = this.add.text(width / 2, height / 2 + 40, 'Homeserver', { fixedWidth: 150, fixedHeight: 36 });
textServer.setOrigin(0.5, 0.5);
textUserServer.setInteractive().on('pointerdown', function() {
console.log(this);
this.scene.rexUI.edit(textServer);
});
const button = this.add.sprite(width / 2, height / 2 +60, 'login');
button.setOrigin(0.5, 0);
// button.setInteractive().on('pointerdown', function() {
// console.log(this);
// }
}
}
export default LoginScene;
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