You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there, I'm currently working on a gui and I'd like to add navigation buttons that will appear only if there's a page to go to. Right now, I have to have click functions on the items that will either add or remove the item depending on which page you're on. If we could have a callback function that is called when the gui is updated, it would simplify this to adding or removing buttons whenever I update the panel for the new page. This also would add a ton of opportunity for things like animations while in guis.
I'm willing to fork and create a pull request for this if you'd like.
The text was updated successfully, but these errors were encountered:
To my understanding you would like to have some kind of Gui#setOnUpdate(Runnable) method for which the provided Runnable is ran every time the gui is updated. Then you'd change the navigation in that Runnable.
I personally don't see the utility in such a method for your purposes. Currently you'd update the navigation whenever the page is swapped, generally whenever the player clicks a navigation button. With your proposed solution, you'd have the same kind of code, but now in a different place. I personally don't think that makes enough of a difference to warrant this addition.
Also, in my opinion it's easier to make the items/panes for the navigation invisible if you can't go in that direction. This probably already helps make your code easier.
Hi there, I'm currently working on a gui and I'd like to add navigation buttons that will appear only if there's a page to go to. Right now, I have to have click functions on the items that will either add or remove the item depending on which page you're on. If we could have a callback function that is called when the gui is updated, it would simplify this to adding or removing buttons whenever I update the panel for the new page. This also would add a ton of opportunity for things like animations while in guis.
I'm willing to fork and create a pull request for this if you'd like.
The text was updated successfully, but these errors were encountered: