mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 02:17:52 +02:00
Update
This commit is contained in:
parent
606f400719
commit
f2fa5320d2
@ -129,16 +129,16 @@ end
|
||||
|
||||
|
||||
function M:on_button_left()
|
||||
self:add_value(true)
|
||||
self:add_step(-1)
|
||||
end
|
||||
|
||||
function M:on_button_right()
|
||||
self:add_value(false)
|
||||
self:add_step(1)
|
||||
end
|
||||
|
||||
|
||||
function M:add_value(is_left)
|
||||
local koef = is_left and -1 or 1
|
||||
---@param koef number -1 0 1, on 0 will not move
|
||||
function M:add_step(koef)
|
||||
local array_type = self.array_type
|
||||
if array_type then
|
||||
local value = self.value
|
||||
@ -165,6 +165,7 @@ function M:set_number_type(min, max, is_loop, steps)
|
||||
steps = steps or 1,
|
||||
is_loop = is_loop,
|
||||
}
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
|
@ -11,6 +11,7 @@ function M:init()
|
||||
:set_text_adjust("scale_when_trim_left", 0.3)
|
||||
|
||||
self.text_right = self.druid:new_text("text_right", "")
|
||||
--:set_text_adjust("scale_when_trim_left", 0.3) -- TODO: not works? why?
|
||||
|
||||
self.container = self.druid:new_container(self.root)
|
||||
self.container:add_container("text_name", nil, function(_, size)
|
||||
|
@ -281,4 +281,11 @@ function M:set_properties_per_page(properties_per_page)
|
||||
end
|
||||
|
||||
|
||||
function M:set_page(page)
|
||||
self.current_page = page
|
||||
self.paginator:set_value(self.current_page, true)
|
||||
self:refresh_page()
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
Loading…
x
Reference in New Issue
Block a user