eternagame / EternaJS

Eterna game/RNA design interface
Other
12 stars 10 forks source link

Support folding engine switcher as a valid target for tutorial script UI commands #736

Closed luxaritas closed 8 months ago

luxaritas commented 8 months ago

Summary

This allows for eg the hideui tutorial script command to work with the folding engine display/switcher

Implementation Notes

Making this change was largely comparing against all places RScriptUIElementID.SWITCH was used and replicating that. Additionally, I did a little cleanup in showHideUI to improve the clarity around elements that skip being hidden

Testing

Tested ShowUIArrow and #pre-hideui on both FOLDER and SWITCH (due to the tweak in handling of SWITCH and other fallthrough cases).

Related Issues

Resolves #724

tkaragianes commented 8 months ago

It might be useful to add a class annotation to the ROPHighlight class. It controls other UI features beyond just highlight, like visibility?

luxaritas commented 8 months ago

As discussed in Slack, ROPHighlight is indeed just highlighting (ROPUI does visiblity and disabled status). isVisible refers to whether the highlight is being shown or removed by this operation