updates in new components

This commit is contained in:
Insality
2019-09-26 00:52:29 +03:00
parent c048224a1f
commit 14e0680f2f
3 changed files with 23 additions and 7 deletions

View File

@@ -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