helium/hooks/setPos.lua
Elmārs Āboliņš 5309f35dfc implemented the rest of the state callbacks
redid layout
luadoc + emmylua annotations everywhere
grid layout started
2021-06-15 03:36:09 +03:00

9 lines
349 B
Lua

local path = string.sub(..., 1, string.len(...) - string.len(".control.size"))
local stack = require(path..'.core.stack')
--Sets the relative position
return function(x, y)
local currentStack = stack.getContext()
currentStack.element.view.x = x or currentStack.element.view.x
currentStack.element.view.y = y or currentStack.element.view.y
end