AinaVT / LethalConfig

A mod configuration menu for Lethal Company
https://thunderstore.io/c/lethal-company/p/AinaVT/LethalConfig/
GNU General Public License v3.0
15 stars 6 forks source link

[Suggestion] Add some mechanism for appending custom ui game objects when the generic button is clicked #34

Open Yinigma opened 7 months ago

Yinigma commented 7 months ago

One of the stated use cases for the generic button is "use it to open custom menus for your mod," but it provides no access to the game's gui. I don't see another way of injecting a menu into the scene on the button press besides rewriting the hooks already present in this mod, which seems like unnecessary and error-prone duplicated work for anyone with this use case. I'd recommend modifying the current generic button delegate or adding a new menu button class that takes a different type of delegate, and in either case having the delegate return a rect transform or a game object that lethalconfig will then add to the canvas along with some canned means of removing or hiding it once the configuration is finished.