From b4c4afb073011e47bc440fcd47dd1d5514781a6a Mon Sep 17 00:00:00 2001 From: gruntmoon Date: Sun, 3 Aug 2025 20:27:15 -0400 Subject: [PATCH 1/2] 4.4 update tab tooltip based on script_editor resource_path Signed-off-by: gruntmoon --- addons/script-tabs/plugin.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/script-tabs/plugin.gd b/addons/script-tabs/plugin.gd index 13e472a..34b7bbf 100644 --- a/addons/script-tabs/plugin.gd +++ b/addons/script-tabs/plugin.gd @@ -72,13 +72,13 @@ func _on_tab_hovered(idx): func _on_scripts_tab_bar_gui_input(event: InputEvent): - if event is InputEventMouseMotion: - var tab_control = _scripts_tab_container.get_tab_control(_last_tab_hovered) - var path = '' - if tab_control: - path = tab_control.get("metadata/_edit_res_path") - _scripts_tab_bar.tooltip_text = '' if path == null else path if _last_tab_hovered == -1: return + + if event is InputEventMouseMotion: + var script_editor = get_editor_interface().get_script_editor() + var script_hover_res = script_editor.get_open_scripts()[_last_tab_hovered].resource_path + _scripts_tab_bar.set_tab_tooltip(_last_tab_hovered, script_hover_res) + if event is InputEventMouseButton: if event.is_pressed() and event.button_index == MOUSE_BUTTON_MIDDLE: _simulate_item_clicked(_last_tab_hovered, MOUSE_BUTTON_MIDDLE) From 228bd2ddeebb4e81769e79395acc560e8a66d215 Mon Sep 17 00:00:00 2001 From: gruntmoon Date: Mon, 4 Aug 2025 22:12:09 -0400 Subject: [PATCH 2/2] Update naming logics Signed-off-by: gruntmoon --- addons/script-tabs/plugin.gd | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/addons/script-tabs/plugin.gd b/addons/script-tabs/plugin.gd index 34b7bbf..a8812b7 100644 --- a/addons/script-tabs/plugin.gd +++ b/addons/script-tabs/plugin.gd @@ -75,9 +75,19 @@ func _on_scripts_tab_bar_gui_input(event: InputEvent): if _last_tab_hovered == -1: return if event is InputEventMouseMotion: - var script_editor = get_editor_interface().get_script_editor() - var script_hover_res = script_editor.get_open_scripts()[_last_tab_hovered].resource_path - _scripts_tab_bar.set_tab_tooltip(_last_tab_hovered, script_hover_res) + var script_editor := get_editor_interface().get_script_editor() + var script_open_array := script_editor.get_open_scripts() + var script_open_counter: int = 0 + var result := [script_open_array[0].resource_path] if _last_tab_hovered == 0 else [] + if result.size() < 1: + for i in range(0, _last_tab_hovered + 1): + var tab_title: String = _scripts_tab_bar.get_tab_title(i) + if tab_title.ends_with(".gd"): + result.append(script_open_array[script_open_counter].resource_path) + script_open_counter += 1 + else: + result.append(tab_title) + _scripts_tab_bar.set_tab_tooltip(_last_tab_hovered, result[_last_tab_hovered]) if event is InputEventMouseButton: if event.is_pressed() and event.button_index == MOUSE_BUTTON_MIDDLE: