mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add list-rings
Adds list-rings, a method to implement item sending between inventories via shift-click. Nice insider feature: a ring consisting of a single inventory list serves as nice clean-up method. Also adds them to minimal game, and the standard inventory. Craft output slots are not supported.
This commit is contained in:
parent
3ae8b92be6
commit
c977fbd928
5 changed files with 156 additions and 14 deletions
|
@ -121,6 +121,22 @@ class GUIFormSpecMenu : public GUIModalMenu
|
|||
s32 start_item_i;
|
||||
};
|
||||
|
||||
struct ListRingSpec
|
||||
{
|
||||
ListRingSpec()
|
||||
{
|
||||
}
|
||||
ListRingSpec(const InventoryLocation &a_inventoryloc,
|
||||
const std::string &a_listname):
|
||||
inventoryloc(a_inventoryloc),
|
||||
listname(a_listname)
|
||||
{
|
||||
}
|
||||
|
||||
InventoryLocation inventoryloc;
|
||||
std::string listname;
|
||||
};
|
||||
|
||||
struct ImageDrawSpec
|
||||
{
|
||||
ImageDrawSpec()
|
||||
|
@ -306,6 +322,7 @@ protected:
|
|||
|
||||
|
||||
std::vector<ListDrawSpec> m_inventorylists;
|
||||
std::vector<ListRingSpec> m_inventory_rings;
|
||||
std::vector<ImageDrawSpec> m_backgrounds;
|
||||
std::vector<ImageDrawSpec> m_images;
|
||||
std::vector<ImageDrawSpec> m_itemimages;
|
||||
|
@ -384,6 +401,7 @@ private:
|
|||
|
||||
void parseSize(parserData* data,std::string element);
|
||||
void parseList(parserData* data,std::string element);
|
||||
void parseListRing(parserData* data,std::string element);
|
||||
void parseCheckbox(parserData* data,std::string element);
|
||||
void parseImage(parserData* data,std::string element);
|
||||
void parseItemImage(parserData* data,std::string element);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue