MenuAPI - Easily create GUIs

###WIP Release
This is the very first “release” of MenuAPI, it is still heavily WIP, but creation of menus, builder syntax, and all that is implemented. The two major parts remaining are documentation and builders. Although there are already builders in the API, I’d like feedback from the community on their design (see the main post for a description of the builder design). I also need to do JavaDocs, as well as a wiki/tutorial thing, and those will be done Soontm. Another interesting feature added for this release is “trackers.” Basically, button or page specific listeners that handle events (see example code in the main post). Also, this release is more or less untested, so it’s likely very buggy, sorry about that ;).

Anyway, thanks for any feedback!

5 Likes

####Status Update:

  • Documentation added to main classes (all the ones in the parent package, com.gmail.socraticphoenix.sponge.menu, but none in any sub packages yet)
  • Some code clean up
  • Fixed some bugs
  • Thought about how to write a wiki
2 Likes

Oh now this, I’ve been waiting for! Yes please!

Any more updates?

There are some more docs written… and a bunch of bug fixes. The API should be usable now, but I still need to finish up the docs.

Would this system work with HuskyCrates by any chance? :slight_smile:

Potentially… the thing is, the menus are not animated… so you’d have to swap pages every time your GUI changed, and you’ll never be able to take items out of the menu… but I took a (really) quick peek at your plugin and it might work.

Ack. Well that probably wouldn’t be convenient. I don’t want hacked together code lol

Demo not work
What’s the problem?

Hmph… turns out I made some changes to trackers and forget to update the demo. Remove the “vars” parameter from the lambda and it’ll work.

Hmm… it occurs to me that you could implement a custom formatter to provide animations, and then call the refresh method on MenuContext each tick… In fact, I may potentially add that in the future… The far future, as I am currently invested in a school programming project…

1 Like

No worries. :)))

thx XD ~XD~XD

demo not work again…

I could have sworn the demo was working when I ran it… Did you modify the demo in any way? If not, I’ve done SOMETHING wrong and I’ll have to fix it… it’s also possible I’m yet to publish a fix I did for trackers… But I thought I did

i m not , i just copy this demo

api version:0.0.1

I’ll check it out…

I know what’s wrong and it may take a while to fix…

ok :slight_smile:

I was trying to come up with a complex solution for the problem… But it’s actually quite simple. For now, you can fix it by using the tracker method that accepts a BiConsumer, and use new SerializableMap for the second (or maybe it’s third) parameter…