mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 18:37:44 +02:00
#25 cherry-pick, update slider component
This commit is contained in:
parent
dc3d311236
commit
2abfe8b0d4
@ -76,6 +76,17 @@ function M.on_input(self, action_id, action)
|
|||||||
if action.released then
|
if action.released then
|
||||||
self.is_drag = false
|
self.is_drag = false
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user