Hi Guys,
I would like to add another option for every blueprint item in game, the only problem I have for now is I have no idea how to add another menu option in Inventory, when you select an item. I mean options like blue print fragments "Upgrade", "Reveal". I want that players have option to Destroy blueprint for BP fragments straight in there.
Can you advise?
Thanks,
Additional option in item GUI like Blueprint Upgrade
Discussion in 'Rust Development' started by Bonzaii, Jan 10, 2016.
-
Wulf Community Admin
You wouldn't be able to add to an existing menu, only create an overlay using the Rust CUI.
-
Regardin that answer, is there any way to determine which slot is currently selected?
If we, somehow add the button on overlay when inventory is opened, how can we know which item is currently selected? (can't find it in oxide api docs)
[DOUBLEPOST=1452533044,1452452744][/DOUBLEPOST]Bump?
-
I'm quite sure there isn't, it will be very unusual for the client to send such data to the server for processing. (Infarct there is no real need for the server to know what item slot you are interacting with)
The best way to achieve anything with the inventory in this manner is to create your own GUI with the inventory inside it, you can then do what you want with it.
Of course there might be other ways, does the player inventory item list contain each item in order of it being displayed in the inventory?
If so, perhaps look at QuickSort and how it opens a custom GUI when the client is looting - then u might be able to create custom buttons over each inventory slot - instead of the user selecting an inventory item, they are clicking a button instead.
But that method is a bit far fetched and would rely on the inventory array being in the same order as how the client sees it.
