mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Move const to const.lua
This commit is contained in:
@@ -81,7 +81,6 @@ function M.after(count, callback)
|
||||
end
|
||||
|
||||
|
||||
local STRING = "string"
|
||||
function M.node(node_or_name)
|
||||
if type(node_or_name) == const.STRING then
|
||||
return gui.get_node(node_or_name)
|
||||
@@ -144,19 +143,8 @@ function M.is_enabled(node)
|
||||
end
|
||||
|
||||
|
||||
local pivots = {
|
||||
[gui.PIVOT_CENTER] = vmath.vector3(0),
|
||||
[gui.PIVOT_N] = vmath.vector3(0, 0.5, 0),
|
||||
[gui.PIVOT_NE] = vmath.vector3(0.5, 0.5, 0),
|
||||
[gui.PIVOT_E] = vmath.vector3(0.5, 0, 0),
|
||||
[gui.PIVOT_SE] = vmath.vector3(0.5, -0.5, 0),
|
||||
[gui.PIVOT_S] = vmath.vector3(0, -0.5, 0),
|
||||
[gui.PIVOT_SW] = vmath.vector3(-0.5, -0.5, 0),
|
||||
[gui.PIVOT_W] = vmath.vector3(-0.5, 0, 0),
|
||||
[gui.PIVOT_NW] = vmath.vector3(-0.5, -0.5, 0),
|
||||
}
|
||||
function M.get_pivot_offset(pivot)
|
||||
return pivots[pivot]
|
||||
return const.PIVOTS[pivot]
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user