Implemented draggingitem API.
This commit is contained in:
parent
b2634bade0
commit
a561886bf3
@ -9503,6 +9503,16 @@ a_Player:OpenWindow(Window);
|
|||||||
},
|
},
|
||||||
Notes = "Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code.",
|
Notes = "Returns the full color code to be used for this player's messages (based on their rank). Prefix player messages with this code.",
|
||||||
},
|
},
|
||||||
|
GetDraggingItem =
|
||||||
|
{
|
||||||
|
Returns =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Type = "cItem",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Notes = "Returns the item the player is dragging in a UI window."
|
||||||
|
},
|
||||||
GetPrefix =
|
GetPrefix =
|
||||||
{
|
{
|
||||||
Returns =
|
Returns =
|
||||||
@ -10340,6 +10350,17 @@ a_Player:OpenWindow(Window);
|
|||||||
},
|
},
|
||||||
Notes = "Sets the custom name for this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion.",
|
Notes = "Sets the custom name for this player. If you want to disable the custom name, simply set an empty string. The custom name will be used in the tab-list, in the player nametag and in the tab-completion.",
|
||||||
},
|
},
|
||||||
|
SetDraggingItem =
|
||||||
|
{
|
||||||
|
Params =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
Name = "Item",
|
||||||
|
Type = "cItem",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
Notes = "Sets the item that the player is dragging in a UI window. If no UI window is open, this function does nothing."
|
||||||
|
},
|
||||||
SetFlying =
|
SetFlying =
|
||||||
{
|
{
|
||||||
Params =
|
Params =
|
||||||
|
@ -1880,6 +1880,19 @@ AString cPlayer::GetPlayerListName(void) const
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void cPlayer::SetDraggingItem(const cItem & a_Item)
|
||||||
|
{
|
||||||
|
if (GetWindow() != nullptr)
|
||||||
|
{
|
||||||
|
m_DraggingItem = a_Item;
|
||||||
|
GetClientHandle()->SendInventorySlot(-1, -1, m_DraggingItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void cPlayer::TossEquippedItem(char a_Amount)
|
void cPlayer::TossEquippedItem(char a_Amount)
|
||||||
{
|
{
|
||||||
cItems Drops;
|
cItems Drops;
|
||||||
|
@ -404,7 +404,10 @@ public:
|
|||||||
void SendExperience(void);
|
void SendExperience(void);
|
||||||
|
|
||||||
/** In UI windows, get the item that the player is dragging */
|
/** In UI windows, get the item that the player is dragging */
|
||||||
cItem & GetDraggingItem(void) {return m_DraggingItem; }
|
cItem & GetDraggingItem(void) {return m_DraggingItem; } // tolua_export
|
||||||
|
|
||||||
|
/** In UI windows, set the item that the player is dragging */
|
||||||
|
void SetDraggingItem(const cItem & a_Item); // tolua_export
|
||||||
|
|
||||||
// In UI windows, when inventory-painting:
|
// In UI windows, when inventory-painting:
|
||||||
/** Clears the list of slots that are being inventory-painted. To be used by cWindow only */
|
/** Clears the list of slots that are being inventory-painted. To be used by cWindow only */
|
||||||
|
Loading…
Reference in New Issue
Block a user