Hi all,
I have implemented A slinding interface (inventory) using this code:
I have a button with:
"On Cursor enters button area":
local pos = Interfaces["Main"].InterfaceOffset
if pos.y == -95 then
Interfaces["Main"]:to(1000, {InterfaceOffset = {x=pos.x,y=0}}, easeQuintIn)
end
And "On Cursor leaves button area":
local pos = Interfaces["Main"].InterfaceOffset
if pos.y == 0 then
Interfaces["Main"]:to(1000, {InterfaceOffset = {x=pos.x, y=-95}}, easeQuintIn)
end
My problem is: In the inventory I have some more buttons (placeholder for items) whan the cursor is on one of them the "Cursor leaves button area" event is triggered and the interface is start to slideing.
How can I solved it?
Thought for solution:
In "Cursor enters/leaves button area", test if the cursor is over one of the interface buttons, if not continue. but what is the code for thet?
Thank you!