diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:45:45 +0100 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2016-02-05 22:50:18 +0100 |
commit | ca6ef58b1ee8521e4b940ee4883dee714960e413 (patch) | |
tree | 8532add455224b07c07a759e3d906f50c0695888 /src/Bindings/LuaWindow.h | |
parent | Merge pull request #2972 from marvinkopf/PlayerAutoComplete (diff) | |
download | cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2 cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip |
Diffstat (limited to 'src/Bindings/LuaWindow.h')
-rw-r--r-- | src/Bindings/LuaWindow.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Bindings/LuaWindow.h b/src/Bindings/LuaWindow.h index 60d4f5792..f292a5154 100644 --- a/src/Bindings/LuaWindow.h +++ b/src/Bindings/LuaWindow.h @@ -40,52 +40,52 @@ class cLuaWindow : // tolua_begin { typedef cWindow super; - + public: /** Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size */ cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString & a_Title); - + virtual ~cLuaWindow(); - + /** Returns the internal representation of the contents that are manipulated by Lua */ cItemGrid & GetContents(void) { return m_Contents; } - + // tolua_end - + /** Sets the plugin reference and the internal Lua object reference index used for preventing Lua's GC to collect this class while the window is open. */ void SetLuaRef(cPluginLua * a_Plugin, int a_LuaRef); - + /** Returns true if SetLuaRef() has been called */ bool IsLuaReferenced(void) const; - + /** Sets the callback function (Lua reference) to call when the window is about to close */ void SetOnClosing(cPluginLua * a_Plugin, int a_FnRef); - + /** Sets the callback function (Lua reference) to call when a slot is changed */ void SetOnSlotChanged(cPluginLua * a_Plugin, int a_FnRef); - + protected: /** Contents of the non-inventory part */ cItemGrid m_Contents; - + /** The plugin that has opened the window and owns the m_LuaRef */ cPluginLua * m_Plugin; - + /** The Lua object reference, used for keeping the object alive as long as any player has the window open */ int m_LuaRef; - + /** The Lua reference for the callback to call when the window is closing for any player */ int m_OnClosingFnRef; - + /** The Lua reference for the callback to call when a slot has changed */ int m_OnSlotChangedFnRef; - + // cWindow overrides: virtual bool ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) override; virtual void Destroy(void) override; virtual void DistributeStack(cItem & a_ItemStack, int a_Slot, cPlayer & a_Player, cSlotArea * a_ClickedArea, bool a_ShouldApply) override; - + // cItemGrid::cListener overrides: virtual void OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) override; } ; // tolua_export |