ADD: lastip

This commit is contained in:
Kolyah35
2026-03-15 20:54:28 +03:00
parent fadcf3a7d0
commit a50877af9e
7 changed files with 66 additions and 55 deletions

View File

@@ -5,6 +5,8 @@
#include "ProgressScreen.h"
#include "../Font.h"
#include "../../../network/RakNetInstance.h"
#include "client/Options.h"
#include "client/gui/Screen.h"
#include "client/gui/components/TextBox.h"
#include "network/ClientSideNetworkHandler.h"
@@ -31,7 +33,7 @@ void JoinByIPScreen::buttonClicked(Button* button)
minecraft->joinMultiplayerFromString(tIP.text);
{
minecraft->options.set(OPTIONS_LAST_IP, tIP.text);
bJoin.active = false;
bBack.active = false;
minecraft->setScreen(new ProgressScreen());
@@ -55,6 +57,7 @@ bool JoinByIPScreen::handleBackEvent(bool isDown)
void JoinByIPScreen::tick()
{
Screen::tick();
bJoin.active = !tIP.text.empty();
}
@@ -78,6 +81,8 @@ void JoinByIPScreen::init()
tabButtons.push_back(&bBack);
tabButtons.push_back(&bHeader);
#endif
tIP.text = minecraft->options.getStringValue(OPTIONS_LAST_IP);
}
void JoinByIPScreen::setupPositions() {