blob: 2969b0539838565dcd727c8533d8149d994fe1e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#include "stdafx.h"
#include "ReceivingLevelScreen.h"
#include "ClientConnection.h"
#include "..\Minecraft.World\net.minecraft.locale.h"
ReceivingLevelScreen::ReceivingLevelScreen(ClientConnection *connection)
{
tickCount = 0;
this->connection = connection;
}
void ReceivingLevelScreen::keyPressed(char eventCharacter, int eventKey)
{
}
void ReceivingLevelScreen::init()
{
buttons.clear();
}
void ReceivingLevelScreen::tick()
{
tickCount++;
if (tickCount % 20 == 0)
{
connection->send(std::make_shared<KeepAlivePacket>());
}
if (connection != nullptr)
{
connection->tick();
}
}
void ReceivingLevelScreen::buttonClicked(Button *button)
{
}
void ReceivingLevelScreen::render(int xm, int ym, float a)
{
renderDirtBackground(0);
Language *language = Language::getInstance();
drawCenteredString(font, language->getElement(L"multiplayer.downloadingTerrain"), width / 2, height / 2 - 50, 0xffffff);
Screen::render(xm, ym, a);
}
|