feat: allow clicking timeline chapter indicators

I don't like this solution, but anything cleaner would probably require converting chapter indicators into individual elements and than managing/updating their positions and sizes in relation to growing timeline, which seems like a lot more work and code, so this'll have to suffice.

closes #370
This commit is contained in:
tomasklaen
2022-11-16 15:23:44 +01:00
parent 682fd81a85
commit 6b2476bace
5 changed files with 79 additions and 25 deletions

View File

@@ -214,8 +214,7 @@ function Controls:register_badge_updater(badge, element)
end
function Controls:get_visibility()
local timeline_is_hovered = Elements.timeline.enabled and Elements.timeline.proximity_raw == 0
return (Elements.speed and Elements.speed.dragging) and 1 or timeline_is_hovered
return (Elements.speed and Elements.speed.dragging) and 1 or Elements.timeline:get_is_hovered()
and -1 or Element.get_visibility(self)
end