mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-02 04:46:43 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user