mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Update private annotations
This commit is contained in:
@@ -94,6 +94,7 @@ function M:init(node, mode, callback)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_late_init()
|
||||
if not gui.get_parent(self.node) then
|
||||
-- TODO: Scale issue here, in fit into window!
|
||||
@@ -102,6 +103,7 @@ function M:on_late_init()
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_remove()
|
||||
self:clear_draggable_corners()
|
||||
end
|
||||
@@ -124,8 +126,8 @@ function M:set_pivot(pivot)
|
||||
end
|
||||
|
||||
|
||||
---Set the style of the container
|
||||
---@param style druid.container.style The style to set
|
||||
---@private
|
||||
---@param style druid.container.style
|
||||
function M:on_style_change(style)
|
||||
self.style = {
|
||||
DRAGGABLE_CORNER_SIZE = style.DRAGGABLE_CORNER_SIZE or vmath.vector3(24, 24, 0),
|
||||
@@ -231,6 +233,7 @@ function M:fit_into_window()
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_window_resized()
|
||||
local x_koef, y_koef = helper.get_screen_aspect_koef()
|
||||
self.x_koef = x_koef
|
||||
|
@@ -50,7 +50,7 @@ function M:init(scroll, grid, create_function)
|
||||
end
|
||||
|
||||
|
||||
---Druid System on_remove function
|
||||
---@private
|
||||
function M:on_remove()
|
||||
self:clear()
|
||||
self.scroll.on_scroll:unsubscribe(self._refresh, self)
|
||||
|
@@ -34,6 +34,7 @@ function M:init(keys, callback, callback_argument)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
---@param style druid.hotkey.style
|
||||
function M:on_style_change(style)
|
||||
self.style = {
|
||||
@@ -103,6 +104,7 @@ function M:is_processing()
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_focus_gained()
|
||||
for k, v in pairs(self._modificators) do
|
||||
self._modificators[k] = false
|
||||
@@ -110,6 +112,7 @@ function M:on_focus_gained()
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
---@param action_id hash|nil The action id
|
||||
---@param action action The action
|
||||
---@return boolean is_consume True if the action is consumed
|
||||
|
@@ -230,11 +230,13 @@ function M:on_input(action_id, action)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_focus_lost()
|
||||
self:unselect()
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_input_interrupt()
|
||||
--self:unselect()
|
||||
end
|
||||
|
@@ -30,6 +30,7 @@ function M:init(node, locale_id, adjust_type)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_language_change()
|
||||
if self.last_locale then
|
||||
self:translate(self.last_locale, unpack(self.last_locale_args))
|
||||
|
@@ -45,6 +45,7 @@ function M:init(node, key, init_value)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
---@param style druid.progress.style
|
||||
function M:on_style_change(style)
|
||||
self.style = {
|
||||
@@ -54,11 +55,13 @@ function M:on_style_change(style)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_layout_change()
|
||||
self:set_to(self.last_value)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_remove()
|
||||
gui.set_size(self.node, self.max_size)
|
||||
end
|
||||
|
@@ -43,17 +43,20 @@ function M:init(node, end_pos, callback)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_layout_change()
|
||||
self:set(self.value)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_remove()
|
||||
-- Return pin to start position
|
||||
gui.set_position(self.node, self.start_pos)
|
||||
end
|
||||
|
||||
|
||||
---@private
|
||||
function M:on_window_resized()
|
||||
local x_koef, y_koef = helper.get_screen_aspect_koef()
|
||||
self._x_koef = x_koef
|
||||
@@ -62,9 +65,10 @@ function M:on_window_resized()
|
||||
end
|
||||
|
||||
|
||||
---@param action_id number The action id
|
||||
---@param action action The action table
|
||||
---@return boolean is_consumed True if the input was consumed
|
||||
---@private
|
||||
---@param action_id hash Action id from on_input
|
||||
---@param action table Action table from on_input
|
||||
---@return boolean is_consumed True if input was consumed
|
||||
function M:on_input(action_id, action)
|
||||
if action_id ~= const.ACTION_TOUCH then
|
||||
return false
|
||||
|
Reference in New Issue
Block a user