i3
i3 copied to clipboard
Add API for adding footer buttons
Currently the footer buttons (trash, sort, settings, home) are hard coded, and there is no API to add more buttons.
My use case is to add a "quick stack to nearby chests" button, which is easy to do with unified_inventory
, but impossible with i3
.
The API would be similar to adding tabs, something like this:
i3.new_button("button", {
description = "Button",
image = "button.png",
-- Called when the button is pressed
action = function(player, data)
local name = player:get_player_name()
minetest.chat_send_player(name, "You pressed the button!")
end,
})