
pmb_inventory.register_formspec_process("crafting", "pmb_inventory:main", function(flags)
    if not minetest.get_modpath("aom_settings") then return end
    return "style_type[button;bgimg=pmb_inv_btn.png\\^\\[multiply:#616161;bgimg_middle=8;"..
    "bgimg_hovered=pmb_inv_btn.png\\^\\[multiply:#616161;bgimg_pressed=pmb_inv_btn_press.png\\^\\[multiply:#616161;"..
    "bgcolor_hovered=#eee;bgcolor_pressed=#fff]".."style_type[button;border=false]".."button[16,10.75;2,1;".."aom_igm_open"..";player menu]"
end)

pmb_inventory.register_on_formspec_action("", "aom_igm_open", function(player, formname, fields)
    minetest.sound_play("aom_igm_click", {
        gain = 1 * aom_igm.get_setting(player, "sound_menu_volume", 1),
        to_player = player:get_player_name(),
    })
    aom_igm.show_page(player, "main")
    return true
end)
