i3 icon indicating copy to clipboard operation
i3 copied to clipboard

Add API for adding footer buttons

Open OgelGames opened this issue 1 year ago • 0 comments

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,
})

OgelGames avatar Aug 09 '23 05:08 OgelGames