summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaWindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/LuaWindow.h')
-rw-r--r--src/Bindings/LuaWindow.h30
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