summaryrefslogtreecommitdiffstats
path: root/src/UI/Window.cpp
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-05-03 23:42:26 +0200
committerHowaner <franzi.moos@googlemail.com>2014-05-05 17:34:29 +0200
commit7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f (patch)
tree22b1673c30752560887116b3623db0bd17896a5e /src/UI/Window.cpp
parentAdd MC|ItemName plugin message. (diff)
downloadcuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar.gz
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar.bz2
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar.lz
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar.xz
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.tar.zst
cuberite-7fe6e40bf7d40347f7f452ea2b7c353a5bc8073f.zip
Diffstat (limited to '')
-rw-r--r--src/UI/Window.cpp35
1 files changed, 32 insertions, 3 deletions
diff --git a/src/UI/Window.cpp b/src/UI/Window.cpp
index d6adbef8f..4991f0147 100644
--- a/src/UI/Window.cpp
+++ b/src/UI/Window.cpp
@@ -807,11 +807,15 @@ cCraftingWindow::cCraftingWindow(int a_BlockX, int a_BlockY, int a_BlockZ) :
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cAnvilWindow:
-cAnvilWindow::cAnvilWindow() :
+cAnvilWindow::cAnvilWindow(int a_BlockX, int a_BlockY, int a_BlockZ) :
cWindow(wtAnvil, "Repair"),
- m_RepairedItemName("")
+ m_RepairedItemName(""),
+ m_BlockX(a_BlockX),
+ m_BlockY(a_BlockY),
+ m_BlockZ(a_BlockZ)
{
- m_SlotAreas.push_back(new cSlotAreaAnvil(*this));
+ m_AnvilSlotArea = new cSlotAreaAnvil(*this);
+ m_SlotAreas.push_back(m_AnvilSlotArea);
m_SlotAreas.push_back(new cSlotAreaInventory(*this));
m_SlotAreas.push_back(new cSlotAreaHotBar(*this));
}
@@ -820,6 +824,31 @@ cAnvilWindow::cAnvilWindow() :
+void cAnvilWindow::SetRepairedItemName(const AString & a_Name, cPlayer * a_Player)
+{
+ m_RepairedItemName = a_Name;
+
+ if (a_Player != NULL)
+ {
+ m_AnvilSlotArea->UpdateResult(*a_Player);
+ }
+}
+
+
+
+
+
+void cAnvilWindow::GetBlockPos(int & a_PosX, int & a_PosY, int & a_PosZ)
+{
+ a_PosX = m_BlockX;
+ a_PosY = m_BlockY;
+ a_PosZ = m_BlockZ;
+}
+
+
+
+
+
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cEnchantingWindow: