mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-04-25 20:21:50 +00:00
fix endgame
This commit is contained in:
parent
08e3c6ad23
commit
c9a1c47dea
2 changed files with 11 additions and 0 deletions
|
|
@ -52,6 +52,12 @@ class EndGameGui extends GuiControl {
|
|||
restartButton.extent = new Vector(104, 48);
|
||||
restartButton.pressedAction = restartFunc;
|
||||
|
||||
function setButtonStates(enabled:Bool) {
|
||||
nextLevelBtn.disabled = !enabled;
|
||||
continueButton.disabled = !enabled;
|
||||
restartButton.disabled = !enabled;
|
||||
}
|
||||
|
||||
var arial14fontdata = ResourceLoader.getFileEntry("data/font/arial.fnt");
|
||||
var arial14b = new BitmapFont(arial14fontdata.entry);
|
||||
@:privateAccess arial14b.loader = ResourceLoader.loader;
|
||||
|
|
@ -173,7 +179,9 @@ class EndGameGui extends GuiControl {
|
|||
Settings.save();
|
||||
|
||||
if (idx <= 2) {
|
||||
setButtonStates(false);
|
||||
var end = new EnterNameDlg(idx, (name) -> {
|
||||
setButtonStates(true);
|
||||
if (scoreSubmitted)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,9 @@ class EnterNameDlg extends GuiControl {
|
|||
enterNameEdit.position = new Vector(87, 136);
|
||||
enterNameEdit.extent = new Vector(255, 36);
|
||||
enterNameEdit.text.text = Settings.highscoreName;
|
||||
haxe.Timer.delay(() -> {
|
||||
enterNameEdit.text.focus();
|
||||
}, 5);
|
||||
|
||||
var okbutton = new GuiButton(loadButtonImages("data/ui/common/ok"));
|
||||
okbutton.position = new Vector(163, 182);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue