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:
1 parent
6d50ac4771
commit
0fbbac1cde
7 files changed
+34
-3
No files matched your search
@@ -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