Skip to content

Commit

Permalink
Add inventory tooltips where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Panquesito7 committed Feb 9, 2024
1 parent b90eeb1 commit ac2d2e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion worldedit_gui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ if minetest.global_exists("unified_inventory") then -- unified inventory install
unified_inventory.register_button("worldedit_gui", {
type = "image",
image = "inventory_plus_worldedit_gui.png",
tooltip = "Edit your World!",
condition = function(player)
return minetest.check_player_privs(player:get_player_name(), {worldedit=true})
end,
Expand Down Expand Up @@ -193,7 +194,8 @@ elseif minetest.global_exists("sfinv") then -- sfinv installed
get = function(self, player, context)
local can_worldedit = minetest.check_player_privs(player, {worldedit=true})
local fs = orig_get(self, player, context)
return fs .. (can_worldedit and "image_button[0,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]" or "")
return fs .. (can_worldedit and "image_button[0,0;1,1;inventory_plus_worldedit_gui.png;worldedit_gui;]" ..
"tooltip[worldedit_gui;Edit your World!]" or "")
end
})

Expand Down

0 comments on commit ac2d2e0

Please sign in to comment.