Scroll refactoring process

This commit is contained in:
Insality
2020-04-28 18:13:43 +03:00
parent 6f8190f1a6
commit 05425fb76c
11 changed files with 1196 additions and 439 deletions

View File

@@ -20,7 +20,7 @@
-- @tfield vector3 border_offer The border offset for correct anchor calculations
local Event = require("druid.event")
local const = require("druid.const")
local helper = require("druid.helper")
local component = require("druid.component")
local M = component.create("grid")
@@ -37,7 +37,7 @@ function M.init(self, parent, element, in_row)
self.offset = vmath.vector3(0)
local pivot = const.PIVOTS[gui.get_pivot(self.parent)]
local pivot = helper.get_pivot_offset(gui.get_pivot(self.parent))
self.anchor = vmath.vector3(0.5 + pivot.x, 0.5 - pivot.y, 0)
self.in_row = in_row or 1