the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#include "stdafx.h"
2#include "ContainerScreen.h"
3#include "Textures.h"
4#include "..\Minecraft.World\net.minecraft.world.inventory.h"
5
6ContainerScreen::ContainerScreen(shared_ptr<Container> inventory, shared_ptr<Container> container) : AbstractContainerScreen(new ContainerMenu(inventory, container))
7{
8 this->inventory = inventory;
9 this->container = container;
10 this->passEvents = false;
11
12 int defaultHeight = 222;
13 int noRowHeight = defaultHeight - 6 * 18;
14 containerRows = container->getContainerSize() / 9;
15
16 imageHeight = noRowHeight + containerRows * 18;
17
18}
19
20void ContainerScreen::renderLabels()
21{
22#if 0
23 font->draw(container->getName(), 8, 2 + 2 + 2, 0x404040);
24 font->draw(inventory->getName(), 8, imageHeight - 96 + 2, 0x404040);
25#endif
26}
27
28void ContainerScreen::renderBg(float a)
29{
30 // 4J Unused
31#if 0
32 int tex = minecraft->textures->loadTexture(L"/gui/container.png");
33 glColor4f(1, 1, 1, 1);
34 minecraft->textures->bind(tex);
35 int xo = (width - imageWidth) / 2;
36 int yo = (height - imageHeight) / 2;
37 this->blit(xo, yo, 0, 0, imageWidth, containerRows * 18 + 17);
38 this->blit(xo, yo + containerRows * 18 + 17, 0, 222 - 96, imageWidth, 96);
39#endif
40}