Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Add API for adding footer buttons #99

Open
OgelGames opened this issue Aug 9, 2023 · 0 comments
Open

Add API for adding footer buttons #99

OgelGames opened this issue Aug 9, 2023 · 0 comments

Comments

@OgelGames
Copy link

OgelGames commented Aug 9, 2023

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,
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant