aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/CraftingScreen.cpp
diff options
context:
space:
mode:
authordaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
committerdaoge_cmd <3523206925@qq.com>2026-03-01 12:16:08 +0800
commitb691c43c44ff180d10e7d4a9afc83b98551ff586 (patch)
tree3e9849222cbc6ba49f2f1fc6e5fe7179632c7390 /Minecraft.Client/CraftingScreen.cpp
parentdef8cb415354ac390b7e89052a50605285f1aca9 (diff)
Initial commit
Diffstat (limited to 'Minecraft.Client/CraftingScreen.cpp')
-rw-r--r--Minecraft.Client/CraftingScreen.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/Minecraft.Client/CraftingScreen.cpp b/Minecraft.Client/CraftingScreen.cpp
new file mode 100644
index 00000000..c28df18d
--- /dev/null
+++ b/Minecraft.Client/CraftingScreen.cpp
@@ -0,0 +1,34 @@
+#include "stdafx.h"
+#include "CraftingScreen.h"
+#include "Textures.h"
+#include "MultiplayerLocalPlayer.h"
+#include "..\Minecraft.World\net.minecraft.world.inventory.h"
+
+CraftingScreen::CraftingScreen(shared_ptr<Inventory> inventory, Level *level, int x, int y, int z) : AbstractContainerScreen(new CraftingMenu(inventory, level, x, y, z))
+{
+}
+
+void CraftingScreen::removed()
+{
+ AbstractContainerScreen::removed();
+ menu->removed(dynamic_pointer_cast<Player>(minecraft->player));
+}
+
+void CraftingScreen::renderLabels()
+{
+ font->draw(L"Crafting", 8 + 16 + 4, 2 + 2 + 2, 0x404040);
+ font->draw(L"Inventory", 8, imageHeight - 96 + 2, 0x404040);
+}
+
+void CraftingScreen::renderBg(float a)
+{
+ // 4J Unused
+#if 0
+ int tex = minecraft->textures->loadTexture(L"/gui/crafting.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