mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-11-13 22:20:19 +01:00
Add tooltip to WorldEdit GUI button (#240)
This commit is contained in:
parent
41efbaf210
commit
eac05e3133
|
@ -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,
|
||||
|
@ -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
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user