FancyMenu [Fabric] [MOVED TO NEW PROJECT]

FancyMenu [Fabric] [MOVED TO NEW PROJECT]

17M Downloads

Button action that mimics other pre-existing buttons

CornerBasket opened this issue ยท 4 comments

commented

When making custom buttons, it would be great to have the option to call upon a specific button action that's utilized by a pre-existing vanilla/modded button.

For example, say I want to make a button that toggles the player's cape similarly to the button in the Skin Customization GUI, but I want to do so in a totally different GUI. This would allow me to call upon the existing Cape button to use its action.

I imagine that instead of incorporating every single possible button action into a menu, this could be done by simply adding a new button action defined by a field, in which a specific button ID can be pasted. After doing so, the custom button takes on the functionality of the original button being called upon.

This is all to essentially remedy the problem that vanilla buttons (ones that don't simply open a GUI) can't be effectively recreated or moved to a different GUI than their default ones. An alternative solution would be to implement the ability to simply move or copy existing buttons to other GUIs.

commented

Thank you very much!
Will try my best to implement it, but no promises :)

commented

Well, that's a good idea and all, but it's simply not that easy. You can't just "copy" a button from a different menu, this is impossible.
The only thing that would make this work is by opening the menu you want a button from in the background, so you can use the active button from the original menu and just use its click action for the custom button.
Imagine somebody doing this with buttons from 10 different menus in one menu. This would open 11 menus on menu load. This is how you create lags ^^

I mean..I can do this, but I don't know if it will work good.

commented

Ah, fair enough! I don't really have a good sense of what would and wouldn't be possible, as I'm fairly new to modding myself. That's unfortunate, but completely understandable. If you're able to implement it somehow, then great! If not, oh well. It's still a fantastic mod regardless.

commented

Added in FancyMenu v2.5.0! Thank you for your suggestion!