From a9e8be1dfcc6d9ceed914a2908f7b7ad92b28816 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nuno=20Gon=C3=A7alves=20=28Ulukyn=29?= Date: Wed, 12 Jul 2023 12:06:26 +0100 Subject: [PATCH] Fix checkRpItemsPosition --- .../data/gamedev/interfaces_v3/interaction.lua | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ryzom/client/data/gamedev/interfaces_v3/interaction.lua b/ryzom/client/data/gamedev/interfaces_v3/interaction.lua index 8a281d924..558904e81 100644 --- a/ryzom/client/data/gamedev/interfaces_v3/interaction.lua +++ b/ryzom/client/data/gamedev/interfaces_v3/interaction.lua @@ -268,7 +268,7 @@ function game:addRequireRpItemsPosition(x, y, id) end function game:addRequireRpItems(left, target, mode, id) - game.wantedRpTargets[left..":"..target..":"..mode] = id + game.wantedRpTargets[left..":"..target..":"..mode..":"..id] = id end game.usedRpLeftItem = "_" @@ -300,16 +300,21 @@ function game:updateRpItems() mode = tostring(getTargetMode()) end + game:checkRpItemsPosition() local html = getUI("ui:interface:rpitems_actions"):find("html") for k, v in pairs(game.wantedRpTargets) do local a = html:find("action"..v) if a then - if string.find(left..":"..target..":"..mode, k) or string.find(left..":"..target..":*", k) then - a:find("but").frozen = false + if a:find("but").onclick_l == "lua" and (string.find(k, left..":"..target..":"..mode) or string.find(k, left..":"..target..":")) then + a:find("img").texture = "grey_0.tga" + a:find("but").onclick_l = "lua" + a:find("but").alpha = 255 a:find("text").alpha = 255 else - a:find("but").frozen = true - a:find("text").alpha = 155 + a:find("img").texture = "r2ed_toolbar_lock_small.tga" + a:find("but").onclick_l = "" + a:find("but").alpha = 150 + a:find("text").alpha = 100 end end end @@ -325,11 +330,13 @@ function game:checkRpItemsPosition() local a = html:find("action"..v) if a then if string.find(sx..":"..sy, k) then - a:find("but").frozen = false + a:find("but").onclick_l = "lua" + a:find("img").texture = "grey_0.tga" a:find("text").alpha = 255 else - a:find("but").frozen = true - a:find("text").alpha = 155 + a:find("but").onclick_l = "proc" + a:find("img").texture = "r2ed_toolbar_lock_small.tga" + a:find("text").alpha = 200 end end end @@ -1290,4 +1297,4 @@ function arkNpcShop:Buy(id) end -- VERSION -- -RYZOM_INTERACTION_VERSION = 324 \ No newline at end of file +RYZOM_INTERACTION_VERSION = 324 -- 2.11.4.GIT