mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-17 20:10:23 +03:00
Make a lot of changes to world and source/gui
This commit is contained in:
40
source/gui/screens/ChatScreen.cpp
Normal file
40
source/gui/screens/ChatScreen.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/********************************************************************
|
||||
Minecraft: Pocket Edition - Decompilation Project
|
||||
Copyright (C) 2023 iProgramInCpp
|
||||
|
||||
The following code is licensed under the BSD 1 clause license.
|
||||
SPDX-License-Identifier: BSD-1-Clause
|
||||
********************************************************************/
|
||||
|
||||
#include "ChatScreen.hpp"
|
||||
|
||||
// @NOTE: This is unused.
|
||||
|
||||
void ChatScreen::buttonClicked(Button* pButton)
|
||||
{
|
||||
}
|
||||
|
||||
void ChatScreen::init()
|
||||
{
|
||||
m_pMinecraft->platform()->showDialog(AppPlatform::DLG_CHAT);
|
||||
m_pMinecraft->platform()->createUserInput();
|
||||
}
|
||||
|
||||
void ChatScreen::render(int mouseX, int mouseY, float f)
|
||||
{
|
||||
int userInputStatus = m_pMinecraft->platform()->getUserInputStatus();
|
||||
if (userInputStatus < 0)
|
||||
return;
|
||||
|
||||
if (userInputStatus == 1)
|
||||
{
|
||||
std::vector<std::string> userInput = m_pMinecraft->platform()->getUserInput();
|
||||
if (userInput.size() >= 1)
|
||||
{
|
||||
// @NOTE: No sending multiplayer chats. Weird
|
||||
m_pMinecraft->m_gui.addMessage(userInput[0]);
|
||||
}
|
||||
}
|
||||
|
||||
m_pMinecraft->setScreen(nullptr);
|
||||
}
|
||||
Reference in New Issue
Block a user