From 5014b4062534ccb7afa512cc6cb37a8df356249f Mon Sep 17 00:00:00 2001 From: TsubakiLoL <2789646812@qq.com> Date: Mon, 16 Dec 2024 11:31:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AA=E7=83=81=E6=97=B6=E9=97=B4=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Robo-Bus-A31-HMI/Modules/settingButtonItem.gd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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()