Conversation
This change allows flyout labels to get into UserWindows. With this change it is also possible to put flyoutlabels in nested containers. wiki documentation that flyout labels cannot be put into containers is not valid anymore.
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
| end | ||
| -- search down one or more levels to enable nesting in a container | ||
| if self:getWindow(label, v) then | ||
| return self:getWindow(label, v) |
There was a problem hiding this comment.
Is it possible to make this infinitely recursive by accident, by putting a child into the grandparent or somesuch?
There was a problem hiding this comment.
I don't think so.
It should be exactly the same recursive function as used in show().
The only way (in my opinion) it could be infinitely recursive would be if a container is in it's own container what shouldn't be possible.
Btw I'm thinking about a rewrite of some FlyoutLabel code but I'm not sure I will do that yet.
In my opinion there should be an easier way of doing this.
There was a problem hiding this comment.
A rewrite sounds good, this code design is a bit messy.
There was a problem hiding this comment.
Now I got totally rid of that part.
Was simpler then i thought but retesting is needed.
Get's rid of the getWindow function and also the closelevels function is less messy
ndsamuelson
left a comment
There was a problem hiding this comment.
I see no issues, and it seems the CI build has fixed itself.
|
Thanks for reviewing @ndsamuelson! Feel free to review more PRs :) Closing this as #3426 has been merged and this PR contains the code from there. |
Brief overview of PR changes/additions
This change allows flyout labels to be put into UserWindows.
With this change it is also possible to put flyoutlabels in nested containers.
wiki documentation that flyout labels cannot be put into containers is not valid anymore.
Motivation for adding to Mudlet
It wasn't possible to add flyout labels to UserWindows or containers with more then one level of depth
Other info (issues closed, discussion etc)