Allow for scroll wheel speed manipulation
This commit is contained in:
parent
1d6ae67c43
commit
8c7b14a7e1
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,8 @@ extends SuiBaseClass
|
||||||
@export var speed_mode: SuiTypes.ScrollMode = SuiTypes.ScrollMode.MULTIPLY_CUSTOM_VALUE
|
@export var speed_mode: SuiTypes.ScrollMode = SuiTypes.ScrollMode.MULTIPLY_CUSTOM_VALUE
|
||||||
@export var speed_multiplier: float = 1
|
@export var speed_multiplier: float = 1
|
||||||
@export var speed_value: float = 1
|
@export var speed_value: float = 1
|
||||||
|
@export_subgroup("Scroller speed (wheel)")
|
||||||
|
@export var speed_wheel_multiplier: float = 50
|
||||||
@export_subgroup("Scroller size")
|
@export_subgroup("Scroller size")
|
||||||
@export var size_mode: SuiTypes.ScrollMode = SuiTypes.ScrollMode.MULTIPLY_VIEWPORT
|
@export var size_mode: SuiTypes.ScrollMode = SuiTypes.ScrollMode.MULTIPLY_VIEWPORT
|
||||||
@export var size_multiplier: float = 0.025
|
@export var size_multiplier: float = 0.025
|
||||||
|
@ -167,7 +169,7 @@ func scroll(direction: SuiTypes.ScrollDirection) -> void:
|
||||||
SuiTypes.ScrollDirection.LEFT: bar = $HScrollBar
|
SuiTypes.ScrollDirection.LEFT: bar = $HScrollBar
|
||||||
SuiTypes.ScrollDirection.RIGHT: bar = $HScrollBar
|
SuiTypes.ScrollDirection.RIGHT: bar = $HScrollBar
|
||||||
|
|
||||||
bar.value = bar.value + bar.step * 50 * dsign
|
bar.value = bar.value + bar.step * speed_wheel_multiplier * dsign
|
||||||
|
|
||||||
func _input(event: InputEvent):
|
func _input(event: InputEvent):
|
||||||
if event is InputEventMouseButton:
|
if event is InputEventMouseButton:
|
||||||
|
|
Loading…
Reference in a new issue