summaryrefslogtreecommitdiff
path: root/modules/visual_script/editor
diff options
context:
space:
mode:
authorderammo <817160+derammo@users.noreply.github.com>2022-05-13 21:11:41 -0400
committerderammo <817160+derammo@users.noreply.github.com>2022-05-21 18:38:40 -0400
commit5a481bd3409f2a03fb5d5bda1ee6ff52c2e126f4 (patch)
treead270df8f38258dc8f2c89419678a23d861ccbfb /modules/visual_script/editor
parent35596e6b745483e503535617f77fd4fcf8b051b2 (diff)
display of large help text in visual script
implemented vertical scroller for help text in popup disabled broken positioning code
Diffstat (limited to 'modules/visual_script/editor')
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp9
-rw-r--r--modules/visual_script/editor/visual_script_property_selector.cpp11
2 files changed, 10 insertions, 10 deletions
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp
index 569bcad780..ffc112df65 100644
--- a/modules/visual_script/editor/visual_script_editor.cpp
+++ b/modules/visual_script/editor/visual_script_editor.cpp
@@ -1959,15 +1959,6 @@ void VisualScriptEditor::_generic_search(Vector2 pos, bool node_centered) {
}
new_connect_node_select->select_from_visual_script(script, false); // do not reset text
-
- // Ensure that the dialog fits inside the graph.
- Size2 bounds = graph->get_global_position() + graph->get_size() - new_connect_node_select->get_size();
- pos.x = pos.x > bounds.x ? bounds.x : pos.x;
- pos.y = pos.y > bounds.y ? bounds.y : pos.y;
-
- if (pos != Vector2()) {
- new_connect_node_select->set_position(pos);
- }
}
void VisualScriptEditor::input(const Ref<InputEvent> &p_event) {
diff --git a/modules/visual_script/editor/visual_script_property_selector.cpp b/modules/visual_script/editor/visual_script_property_selector.cpp
index c8549ddb53..e78ec93b25 100644
--- a/modules/visual_script/editor/visual_script_property_selector.cpp
+++ b/modules/visual_script/editor/visual_script_property_selector.cpp
@@ -521,8 +521,17 @@ VisualScriptPropertySelector::VisualScriptPropertySelector() {
results_tree->connect("item_selected", callable_mp(this, &VisualScriptPropertySelector::_item_selected));
vbox->add_child(results_tree);
+ ScrollContainer *scroller = memnew(ScrollContainer);
+ scroller->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
+ scroller->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ scroller->set_custom_minimum_size(Size2(600, 400) * EDSCALE);
+ vbox->add_child(scroller);
+
help_bit = memnew(EditorHelpBit);
- vbox->add_child(help_bit);
+ help_bit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
+ help_bit->set_v_size_flags(Control::SIZE_EXPAND_FILL);
+ scroller->add_child(help_bit);
+
help_bit->connect("request_hide", callable_mp(this, &VisualScriptPropertySelector::_hide_requested));
get_ok_button()->set_text(TTR("Open"));
get_ok_button()->set_disabled(true);