API
Functions and classes available in the Lua API
Public Member Functions | List of all members
cLuaWindow Class Reference

#include <002d.h>

Inheritance diagram for cLuaWindow:
Inheritance graph
[legend]

Public Member Functions

 cLuaWindow (cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString &a_Title)
 Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size.
cItemGridGetContents (void)
 Returns the internal representation of the contents that are manipulated by Lua.
virtual ~cLuaWindow ()
- Public Member Functions inherited from cWindow
const cItemGetSlot (cPlayer &a_Player, int a_SlotNum) const
 Returns the item at the specified slot for the specified player. Returns NULL if invalid SlotNum requested.
char GetWindowID (void) const
const AString & GetWindowTitle () const
int GetWindowType (void) const
bool IsSlotInPlayerHotbar (int a_SlotNum) const
 Returns true if the specified slot is in the Player Hotbar slotarea.
bool IsSlotInPlayerInventory (int a_SlotNum) const
 Returns true if the specified slot is in the Player Main Inventory or Hotbar slotareas. Note that returns false for Armor.
bool IsSlotInPlayerMainInventory (int a_SlotNum) const
 Returns true if the specified slot is in the Player Main Inventory slotarea.
void SetSlot (cPlayer &a_Player, int a_SlotNum, const cItem &a_Item)
 Sets the item to the specified slot for the specified player.
void SetWindowTitle (const AString &a_WindowTitle)

Additional Inherited Members

- Public Types inherited from cWindow
enum  WindowType {
  Inventory = -1, Chest = 0, Workbench = 1, Furnace = 2,
  DropSpenser = 3, Enchantment = 4, Brewery = 5, NPCTrade = 6,
  Beacon = 7, Anvil = 8, Hopper = 9
}

Detailed Description

A window that has been created by a Lua plugin and is handled entirely by that plugin

This object needs extra care with its lifetime management:

Constructor & Destructor Documentation

cLuaWindow::cLuaWindow ( cWindow::WindowType  a_WindowType,
int  a_SlotsX,
int  a_SlotsY,
const AString &  a_Title 
)

Create a window of the specified type, with a slot grid of a_SlotsX * a_SlotsY size.

virtual cLuaWindow::~cLuaWindow ( )
virtual

Member Function Documentation

cItemGrid& cLuaWindow::GetContents ( void  )
inline

Returns the internal representation of the contents that are manipulated by Lua.