mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-22 22:25:35 +00:00
restructure codebase according to vcproj filters
This commit is contained in:
36
Minecraft.Client/net/minecraft/client/gui/HopperScreen.cpp
Normal file
36
Minecraft.Client/net/minecraft/client/gui/HopperScreen.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "../../../../../Minecraft.World/Header Files/stdafx.h"
|
||||
#include "HopperScreen.h"
|
||||
#include "../renderer/Textures.h"
|
||||
#include "../player/LocalPlayer.h"
|
||||
#include "Font.h"
|
||||
#include "../../../../../Minecraft.World/net/minecraft/world/inventory/net.minecraft.world.inventory.h"
|
||||
#include "../../../../../Minecraft.World/net/minecraft/world/inventory/HopperMenu.h"
|
||||
|
||||
// 4jcraft: referenced from MCP 8.11 (JE 1.6.4) and the existing
|
||||
// container classes
|
||||
#ifdef ENABLE_JAVA_GUIS
|
||||
ResourceLocation GUI_HOPPER_LOCATION = ResourceLocation(TN_GUI_HOPPER);
|
||||
#endif
|
||||
|
||||
HopperScreen::HopperScreen(std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<Container> hopper)
|
||||
: AbstractContainerScreen(new HopperMenu(inventory, hopper)) {
|
||||
this->hopper = hopper;
|
||||
this->inventory = inventory;
|
||||
imageHeight = 133;
|
||||
}
|
||||
|
||||
void HopperScreen::renderLabels() {
|
||||
font->draw(hopper->getName(), 8, 6, 0x404040);
|
||||
font->draw(inventory->getName(), 8, imageHeight - 96 + 2, 0x404040);
|
||||
}
|
||||
|
||||
void HopperScreen::renderBg(float a) {
|
||||
#ifdef ENABLE_JAVA_GUIS
|
||||
glColor4f(1, 1, 1, 1);
|
||||
minecraft->textures->bindTexture(&GUI_HOPPER_LOCATION);
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
this->blit(xo, yo, 0, 0, imageWidth, imageHeight);
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user