summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaWindow.h
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2016-02-06 11:37:34 +0100
commit6fdd7194c81be7234a126bdc3b48f0291fce3567 (patch)
tree7d5ac74b7385ce4ebf77588d80549c884c2b993c /src/Bindings/LuaWindow.h
parentMerge pull request #2958 from LogicParrot/fence (diff)
parentBulk clearing of whitespace (diff)
downloadcuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.gz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.bz2
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.lz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.xz
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.tar.zst
cuberite-6fdd7194c81be7234a126bdc3b48f0291fce3567.zip
Diffstat (limited to '')
-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