mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Add help buttons
This commit is contained in:
parent
c441426739
commit
2441e9e54e
3 changed files with 16 additions and 2 deletions
|
@ -1,2 +1,10 @@
|
||||||
|
-- Disable built-in factoids; it is planned to add custom ones as replacements
|
||||||
doc.sub.items.disable_core_factoid("node_mining")
|
doc.sub.items.disable_core_factoid("node_mining")
|
||||||
doc.sub.items.disable_core_factoid("tool_capabilities")
|
doc.sub.items.disable_core_factoid("tool_capabilities")
|
||||||
|
|
||||||
|
-- Help button callback
|
||||||
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
if fields.__mcl_doc then
|
||||||
|
doc.show_doc(player:get_player_name())
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
|
@ -245,8 +245,11 @@ mcl_inventory.set_creative_formspec = function(player, start_i, pagenum, show, p
|
||||||
-- crafting guide button
|
-- crafting guide button
|
||||||
"image_button[9,1;1,1;craftguide_book.png;__mcl_craftguide;]"..
|
"image_button[9,1;1,1;craftguide_book.png;__mcl_craftguide;]"..
|
||||||
"tooltip[__mcl_craftguide;Show crafting recipes]"..
|
"tooltip[__mcl_craftguide;Show crafting recipes]"..
|
||||||
|
-- help button
|
||||||
|
"image_button[9,2;1,1;doc_button_icon_lores.png;__mcl_doc;]"..
|
||||||
|
"tooltip[__mcl_doc;Help]"..
|
||||||
-- achievements button
|
-- achievements button
|
||||||
"image_button[9,2;1,1;mcl_achievements_button.png;__mcl_achievements;]"..
|
"image_button[9,3;1,1;mcl_achievements_button.png;__mcl_achievements;]"..
|
||||||
"tooltip[__mcl_achievements;Achievements]"
|
"tooltip[__mcl_achievements;Achievements]"
|
||||||
|
|
||||||
-- For shortcuts
|
-- For shortcuts
|
||||||
|
|
|
@ -92,8 +92,11 @@ local function set_inventory(player, armor_change_only)
|
||||||
-- crafting guide button
|
-- crafting guide button
|
||||||
"image_button[8,0;1,1;craftguide_book.png;__mcl_craftguide;]"..
|
"image_button[8,0;1,1;craftguide_book.png;__mcl_craftguide;]"..
|
||||||
"tooltip[__mcl_craftguide;Show crafting recipes]"..
|
"tooltip[__mcl_craftguide;Show crafting recipes]"..
|
||||||
|
-- help button
|
||||||
|
"image_button[8,1;1,1;doc_button_icon_lores.png;__mcl_doc;]"..
|
||||||
|
"tooltip[__mcl_doc;Help]"..
|
||||||
-- achievements button
|
-- achievements button
|
||||||
"image_button[8,1;1,1;mcl_achievements_button.png;__mcl_achievements;]"..
|
"image_button[8,2;1,1;mcl_achievements_button.png;__mcl_achievements;]"..
|
||||||
"tooltip[__mcl_achievements;Achievements]"..
|
"tooltip[__mcl_achievements;Achievements]"..
|
||||||
-- for shortcuts
|
-- for shortcuts
|
||||||
"listring[current_player;main]"..
|
"listring[current_player;main]"..
|
||||||
|
|
Loading…
Reference in a new issue