Skip to content
Snippets Groups Projects
Commit 8fa37de2 authored by DarkGod's avatar DarkGod
Browse files

RIght click on the inventory icon on the toolbar will bring up the ingredients list

parent c27bc9c5
No related branches found
No related tags found
No related merge requests found
......@@ -1856,8 +1856,9 @@ function _M:displayToolbar(scale, bx, by)
game.mouse:unregisterZone("tb_inven")
local desc_fct = function(button, mx, my, xrel, yrel, bx, by, event)
if event == "out" then self.tbbuttons.inven = 0.6 return else self.tbbuttons.inven = 1 end
game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show inventory")
if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("SHOW_INVENTORY") end
game.tooltip_x, game.tooltip_y = 1, 1; game:tooltipDisplayAtMap(game.w, game.h, "Left mouse to show inventory\nRight mouse to show ingredients")
if button == "left" and not xrel and not yrel and event == "button" then game.key:triggerVirtual("SHOW_INVENTORY")
elseif button == "right" and not xrel and not yrel and event == "button" then game:registerDialog(require("mod.dialogs.ShowIngredients").new(game.party)) end
end
game.mouse:registerZone(bx + x * scale, by +y*scale, tb_inven[6], tb_inven[7], desc_fct, nil, "tb_inven", true, scale)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment