diff --git a/Robo-Bus-A31-HMI/Modules/settingButtonItem.gd b/Robo-Bus-A31-HMI/Modules/settingButtonItem.gd index 9230f9a..abb9ba5 100644 --- a/Robo-Bus-A31-HMI/Modules/settingButtonItem.gd +++ b/Robo-Bus-A31-HMI/Modules/settingButtonItem.gd @@ -5,6 +5,8 @@ extends BaseControl #用来播放动画的tween var animation_tween +##闪烁时间间隔 +@export var flicker_time:float=0.2 func _ready() -> void: super._ready() self.button_down.connect(_on_button_down) @@ -32,11 +34,11 @@ var is_select:bool: if animation_tween!=null: animation_tween.kill() animation_tween=create_tween() - animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15) - animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(0.15) - animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15) - animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(0.15) - animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(0.15) + animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time) + animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(flicker_time) + animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time) + animation_tween.tween_callback(set_texture.bind(TextureNormal)).set_delay(flicker_time) + animation_tween.tween_callback(set_texture.bind(TexturePressed)).set_delay(flicker_time) else: if animation_tween!=null: animation_tween.kill()