LexiEmory / DialogueTreePlugin

A dialogue tree editor and engine for godot 3.0
MIT License
31 stars 9 forks source link

Basic Dialogue GraphNode text line doesn't fill empty vertical space when resized. #9

Open ghost opened 4 years ago

ghost commented 4 years ago

Issue marked for resolution in 4.0 with godot is GraphNode's ignoring setting a sub-control node's size flags (fill/expand vertically or horizontally).

Small quality of life when using this library is to have basic dialogue's text entry expand to fill the size of the window for the inevitable situation where someone drops a ton of dialogue into the box. Easy patch that can be done to enable this behavior is to change the DialogueEdit node in BasicDialogue to a TextEdit node and connect the GraphNode's "resized" signal to the BasicDialogue script and set the rect_min_size.y on the (now TextEdit) DialogueEdit. I used these values to get what I felt was the best look for the node when resizing.

$DialogueEdit.rect_min_size.y = max(30, rect_size.y-110)

Also enabling word wrap cleaned up the look a lot. Short gif of the change in action.

https://gyazo.com/823b1599424f0159f46dafb3795fb737

Whether it gets added in or not, may be helpful to some people in the future to have an easy solution. Absolutely fantastic library overall though.

Edit: Also added this to the end of the load_data func to esnure the box size is set on reloading a dialog tree $DialogueEdit.rect_min_size.y = max(30, rect_size.y-110)

IvailoBurov commented 3 years ago

Thank you @TWiker92 .