FancyMenu [Fabric] [MOVED TO NEW PROJECT]

FancyMenu [Fabric] [MOVED TO NEW PROJECT]

17M Downloads

[compatability/feature request] Button Action by Button Key

milkev opened this issue · 6 comments

commented

Describe your idea
Allow setting a button action to a button key (as displayed by customization -> button info). this would allow compatibility with continue button, and potentially other mods. Continue Button is the only one im aware of that this would help significantly. This could also help with creating buttons in general, as instead of getting the arbitrary numbers that default minecraft has, you could simply use the button key of whatever button goes to that menu, which are much more human readable.
I don't know a lot about minecraft modding, so if this is impossible, or just isnt how it works, sorry.

Does it frustrate you to not already have this feature in the mod?
this would be very helpfull to have.

commented

you cant create a new button using the continue button functionality

and i see, that would make them quite a problem to use

commented

Do you want to make a custom button that does the same as when clicking on the continue button?
Why do you need a new button? Why not using the original continue button?

commented

What do you mean by "would allow compatibility"? "Continue Button" should be compatible with FancyMenu I think?

You can already use button keys as identifier for button customizations. At least in the old button Id system, don’t know if I’ve reimplemented it in the new one. But the problem with keys is, they are not failsafe. The IDs I give to buttons are not IDs from MC (because MC don't has button IDs anymore on 1.13+), they are generated by my own system and calculated out of button positions. As long as the button is not getting moved, the ID will always stay the same, but keys can change out of many different reasons. It’s no longer recommended to use button keys for identification, that’s why it’s not mentioned very often.

commented

i wanted to add it to the options menu's so you could go to your world without escape'ing through all the menus.

commented

That will never be possible, sorry :/ Problem is, you would need to load the original menu of the button you want to copy everytime you click it. Would be really bad for the performance. Another possibility would be to cache button bodies of menus you open. Then the system could use the cache to copy a button, but there are two problems with this method. First is, you would only be able to copy buttons of menus you already opened before. That would be too confusing for users of the mod. Second problem is, even if the button you want to copy is cached, you will only be able to copy the button by its cached click action. If someone wants to copy a button that changes its behavior, it would simply not work. Would be very confusing for mod users too. And there are no better options to do this, that’s why I haven’t implemented it yet (and will probably never do it).

commented

i understand now, thanks for taking the time to explain it to me!