username change on jsg

This commit is contained in:
RandomityGuy 2024-07-04 01:34:11 +05:30
parent 0c58d597d4
commit bdccf31a23
10 changed files with 16 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

View file

@ -96,7 +96,10 @@ class EnterNameDlg extends GuiControl {
enterNameText.position = new Vector(37, 23);
enterNameText.extent = new Vector(345, 85);
// enterNameText.justify = Center;
enterNameText.text.text = '<font face="Arial14"><br/></font><p align="center"><font face="DomCasual48">Well Done!<br/></font><font face="DomCasual32">You have the${["", " second", " third", " fourth", " fifth"][place]} top time!</font></p>';
if (place != -1)
enterNameText.text.text = '<font face="Arial14"><br/></font><p align="center"><font face="DomCasual48">Well Done!<br/></font><font face="DomCasual32">You have the${["", " second", " third", " fourth", " fifth"][place]} top time!</font></p>';
else
enterNameText.text.text = '<p align="center"><font face="DomCasual32">Enter your desired display name</font></p>';
dlg.addChild(enterNameText);
dlg.addChild(enterNameEdit);

View file

@ -258,6 +258,14 @@ class JoinServerGui extends GuiImage {
}
window.addChild(joinBtn);
var usernameBtn = new GuiButton(loadButtonImages("data/ui/mp/join/username"));
usernameBtn.position = new Vector(216, 379);
usernameBtn.extent = new Vector(125, 45);
usernameBtn.pressedAction = (e) -> {
MarbleGame.canvas.pushDialog(new EnterNameDlg(-1, (n) -> {}));
}
window.addChild(usernameBtn);
passwordJoin.pressedAction = (e) -> {
joinFunc(passwordInput.text.text);
}
@ -329,5 +337,9 @@ class JoinServerGui extends GuiImage {
window.addChild(listTitle);
this.addChild(window);
if (StringTools.trim(Settings.highscoreName).length == 0 || Settings.highscoreName == "Player") {
MarbleGame.canvas.pushDialog(new EnterNameDlg(-1, (n) -> {})); // Pls enter name
}
}
}