mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-14 22:41:54 +00:00
feat(jui): re-enable and update TrapScreen
(Dispenser and Dropper GUI)
This commit is contained in:
@@ -6,23 +6,29 @@
|
||||
#include "../../../Minecraft.World/Blocks/TileEntities/DispenserTileEntity.h"
|
||||
#include "../../../Minecraft.World/Headers/net.minecraft.world.h"
|
||||
|
||||
#ifdef ENABLE_JAVA_GUIS
|
||||
ResourceLocation GUI_TRAP_LOCATION = ResourceLocation(TN_GUI_TRAP);
|
||||
#endif
|
||||
|
||||
TrapScreen::TrapScreen(std::shared_ptr<Inventory> inventory,
|
||||
std::shared_ptr<DispenserTileEntity> trap)
|
||||
: AbstractContainerScreen(new TrapMenu(inventory, trap)) {}
|
||||
: AbstractContainerScreen(new TrapMenu(inventory, trap)) {
|
||||
this->trap = trap;
|
||||
this->inventory = inventory;
|
||||
}
|
||||
|
||||
void TrapScreen::renderLabels() {
|
||||
font->draw(L"Dispenser", 16 + 4 + 40, 2 + 2 + 2, 0x404040);
|
||||
font->draw(L"Inventory", 8, imageHeight - 96 + 2, 0x404040);
|
||||
font->draw(trap->getName(), 16 + 4 + 40, 2 + 2 + 2, 0x404040);
|
||||
font->draw(inventory->getName(), 8, imageHeight - 96 + 2, 0x404040);
|
||||
}
|
||||
|
||||
void TrapScreen::renderBg(float a) {
|
||||
// 4J Unused
|
||||
#if 0
|
||||
int tex = minecraft->textures->loadTexture(L"/gui/trap.png");
|
||||
glColor4f(1, 1, 1, 1);
|
||||
minecraft->textures->bind(tex);
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
this->blit(xo, yo, 0, 0, imageWidth, imageHeight);
|
||||
#ifdef ENABLE_JAVA_GUIS
|
||||
glColor4f(1, 1, 1, 1);
|
||||
minecraft->textures->bindTexture(&GUI_TRAP_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