From b691c43c44ff180d10e7d4a9afc83b98551ff586 Mon Sep 17 00:00:00 2001 From: daoge_cmd <3523206925@qq.com> Date: Sun, 1 Mar 2026 12:16:08 +0800 Subject: Initial commit --- Minecraft.Client/TrapScreen.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Minecraft.Client/TrapScreen.cpp (limited to 'Minecraft.Client/TrapScreen.cpp') diff --git a/Minecraft.Client/TrapScreen.cpp b/Minecraft.Client/TrapScreen.cpp new file mode 100644 index 00000000..c7eb1472 --- /dev/null +++ b/Minecraft.Client/TrapScreen.cpp @@ -0,0 +1,31 @@ +#include "stdafx.h" +#include "TrapScreen.h" +#include "LocalPlayer.h" +#include "Textures.h" +#include "..\Minecraft.World\net.minecraft.world.inventory.h" +#include "..\Minecraft.World\DispenserTileEntity.h" +#include "..\Minecraft.World\net.minecraft.world.h" + +TrapScreen::TrapScreen(shared_ptr inventory, shared_ptr trap) : AbstractContainerScreen(new TrapMenu(inventory, trap)) +{ + +} + +void TrapScreen::renderLabels() +{ + font->draw(L"Dispenser", 16 + 4 + 40, 2 + 2 + 2, 0x404040); + font->draw(L"Inventory", 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); +#endif +} \ No newline at end of file -- cgit v1.2.3