feat(jui): add world leaving

You will now be able to leave the world from all places where you'd usually be able to (Pause screen, death screen)
Should be identical to the way it's done on Iggy/XUI
This commit is contained in:
Sally Knight
2026-03-19 15:05:32 +03:00
parent 6d50ac4771
commit 0fbbac1cde
7 changed files with 34 additions and 3 deletions

View File

@@ -3,6 +3,7 @@
#include "DeathScreen.h"
#include "../Button.h"
#include "../../Player/MultiPlayerLocalPlayer.h"
#include "PauseScreen.h"
#include "TitleScreen.h"
void DeathScreen::init() {
@@ -30,9 +31,11 @@ void DeathScreen::buttonClicked(Button* button) {
// minecraft.setScreen(new NewLevelScreen(this));
}
if (button->id == 2) {
// TODO: proper world exits
// minecraft->setLevel(NULL);
// minecraft->setScreen(new TitleScreen());
// 4jcraft: use the static method from PauseScreen to exit
PauseScreen::exitWorld(minecraft, true);
}
}