Yes it's possible & I shared the method multiple times throughout the forum already. I probably should add it as an alternative method in the sliding interface script on the wiki, no?
local int = Interfaces["name"]
if int.InterfaceOffset.x == 0 then
int:to(1000, { InterfaceOffset = {x = -200, y = int.InterfaceOffset.y } }, easeQuintIn)
elseif int.InterfaceOffset.x == -200 then
int:to(1000, { InterfaceOffset = {x = 0, y = int.InterfaceOffset.y } }, easeQuintOut)
end
... what we have here is a simple 2 query that checks if interface is at one position or another or neither (if it's neither then it's because it's currently moving). One position will make it slide back to the default position & the other will make it slide out to the target position.
This method is a lot faster than the Deponia interface script I wrote a while back, but we didn't have the tweening functions or Lua shorthand back when I wrote that.
P.S: this script is kind of basic as it prevents the player from cancelling the slide in/out order & they will have to wait until it's reached its destination before they can slide it back in or out, unlike the deponia interface script I wrote, because I used various math equations to calculate the needed pixels / speed it would need to make it slide in/out at the same speed regardless of the current position it was at.