Update audio track volume slider

This commit is contained in:
2025-02-16 15:25:01 +01:00
parent 49c0e6c071
commit 60282fc89c
8 changed files with 121 additions and 29 deletions

View File

@@ -1,6 +1,6 @@
@tool
class_name Timeline
extends Control
extends Container
@export var track_list: VBoxContainer
@@ -44,6 +44,10 @@ func _draw():
var time_label_offset_x = get_theme_constant("time_label_offset_x", "Timeline")
var time_label_offset_y = get_theme_constant("time_label_offset_y", "Timeline")
# background
var background_stylebox = get_theme_stylebox("background", "Timeline")
draw_style_box(background_stylebox, Rect2(0.0, 0.0, size.x, size.y))
# top panel
var stylebox = get_theme_stylebox("top_panel", "Timeline")
draw_style_box(stylebox, Rect2(0.0, 0.0, size.x, 28.0))
@@ -77,10 +81,10 @@ func _gui_input(event):
zoom *= zoom_factor
queue_redraw()
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_WHEEL_LEFT:
time_offset -= 50 / zoom
time_offset -= 10
queue_redraw()
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_WHEEL_RIGHT:
time_offset += 50 / zoom
time_offset += 10
queue_redraw()
zoom = max(min_zoom, zoom)