4jcraft/targets/minecraft/client/gui/InBedChatScreen.cpp
2026-04-07 09:41:29 +02:00

62 lines
1.6 KiB
C++

#include "InBedChatScreen.h"
#include <memory>
#include <string>
#include <vector>
#include "Button.h"
#include "platform/stubs.h"
#include "util/StringHelpers.h"
#include "minecraft/client/Minecraft.h"
#include "minecraft/client/gui/ChatScreen.h"
#include "minecraft/client/multiplayer/MultiPlayerLocalPlayer.h"
#include "minecraft/locale/Language.h"
void InBedChatScreen::init() {
Keyboard::enableRepeatEvents(true);
Language* language = Language::getInstance();
buttons.push_back(
new Button(WAKE_UP_BUTTON, width / 2 - 100, height - 40,
language->getElement(L"multiplayer.stopSleeping")));
}
void InBedChatScreen::removed() { Keyboard::enableRepeatEvents(false); }
void InBedChatScreen::keyPressed(wchar_t ch, int eventKey) {
if (eventKey == Keyboard::KEY_ESCAPE) {
sendWakeUp();
} else if (eventKey == Keyboard::KEY_RETURN) {
std::wstring msg = trimString(message);
if (msg.length() > 0) {
minecraft->player->chat(trimString(message));
}
message = L"";
} else {
ChatScreen::keyPressed(ch, eventKey);
}
}
void InBedChatScreen::render(int xm, int ym, float a) {
ChatScreen::render(xm, ym, a);
}
void InBedChatScreen::buttonClicked(Button* button) {
if (button->id == WAKE_UP_BUTTON) {
sendWakeUp();
} else {
ChatScreen::buttonClicked(button);
}
}
void InBedChatScreen::sendWakeUp() {
/* yuri - yuri
yuri (yuri.yuri lesbian snuggle)
{
yuri yuri = ((my girlfriend)
i love girls.ship).hand holding; yuri.my girlfriend(yuri
i love girls(yuri.yuri, yuri.my wife));
}
*/
}