From 95c6f73adc4bda5effafbdd79e485c884cc459b5 Mon Sep 17 00:00:00 2001 From: WallK Date: Fri, 22 Dec 2023 09:14:01 +0200 Subject: [PATCH] Changed speech bubble to use tooltips instead Also, temporary enabled tooltip hover --- tools/configurator/helper_text.gd | 4 ++-- tools/configurator/main.tscn | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/configurator/helper_text.gd b/tools/configurator/helper_text.gd index d94060ef..3f3673ea 100755 --- a/tools/configurator/helper_text.gd +++ b/tools/configurator/helper_text.gd @@ -7,7 +7,7 @@ func _ready(): get_viewport().connect("gui_focus_changed", _on_focus_changed) func _on_focus_changed(selected_element:Control) -> void: - if selected_element != null and selected_element.has_meta("description"): - helper_text_node.text = selected_element.get_meta("description") + if selected_element != null and selected_element.get_tooltip(): + helper_text_node.text = selected_element.tooltip_text else: helper_text_node.text = "Hey, there's no description" diff --git a/tools/configurator/main.tscn b/tools/configurator/main.tscn index 183a2afc..4c0936ad 100755 --- a/tools/configurator/main.tscn +++ b/tools/configurator/main.tscn @@ -138,6 +138,7 @@ columns = 2 [node name="resume" type="CheckButton" parent="MarginContainer/TabContainer/System/ScrollContainer/VBoxContainer/game_control_container/GridContainer"] layout_mode = 2 +tooltip_text = "This is a test tooltip set to this element" theme_override_constants/h_separation = 128 button_pressed = true text = "Quick Resume" @@ -145,11 +146,12 @@ metadata/description = "This is a test description set to this element" [node name="Button" type="Button" parent="MarginContainer/TabContainer/System/ScrollContainer/VBoxContainer/game_control_container/GridContainer"] layout_mode = 2 -disabled = true text = "Advanced" [node name="rewind" type="CheckButton" parent="MarginContainer/TabContainer/System/ScrollContainer/VBoxContainer/game_control_container/GridContainer"] layout_mode = 2 +tooltip_text = "This is another, very long and convoluted, tooltip, that I put too much commas in to make in LONGER and more SOPHISTICATED. And I did it twice!!! +This is another, very long and convoluted, tooltip, that I put too much commas in to make in LONGER and more SOPHISTICATED." theme_override_constants/h_separation = 256 text = "Rewind" metadata/description = "This is another description. Very long text anyone? Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."