mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
updates in new components
This commit is contained in:
@@ -12,8 +12,8 @@ end
|
||||
|
||||
function M.set_state(self, indexes)
|
||||
for i = 1, #indexes do
|
||||
if self.checkbox[indexes[i]] then
|
||||
self.checkbox[indexes[i]]:set_state(true, true)
|
||||
if self.checkboxes[i] then
|
||||
self.checkboxes[i]:set_state(indexes[i], true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -76,6 +76,17 @@ function M.on_input(self, action_id, action)
|
||||
if action.released then
|
||||
self.is_drag = false
|
||||
end
|
||||
|
||||
return self.is_drag
|
||||
end
|
||||
|
||||
|
||||
function M.set(self, value)
|
||||
value = helper.clamp(value, 0, 1)
|
||||
|
||||
gui.set_position(self.node, self.start_pos + self.dist * value)
|
||||
self.value = value
|
||||
on_change_value(self)
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user