mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-23 00:13:31 +00:00
25 lines
649 B
C++
Executable File
25 lines
649 B
C++
Executable File
#include "ChatScreen.h"
|
|
#include "DialogDefinitions.h"
|
|
#include "../Gui.h"
|
|
#include "../../Minecraft.h"
|
|
#include "../../../AppPlatform.h"
|
|
#include "../../../platform/log.h"
|
|
|
|
void ChatScreen::init() {
|
|
minecraft->platform()->createUserInput(DialogDefinitions::DIALOG_NEW_CHAT_MESSAGE);
|
|
}
|
|
|
|
void ChatScreen::render(int xm, int ym, float a)
|
|
{
|
|
int status = minecraft->platform()->getUserInputStatus();
|
|
if (status > -1) {
|
|
if (status == 1) {
|
|
std::vector<std::string> v = minecraft->platform()->getUserInput();
|
|
if (v.size() && v[0].length() > 0)
|
|
minecraft->gui.addMessage(v[0]);
|
|
}
|
|
|
|
minecraft->setScreen(NULL);
|
|
}
|
|
}
|