Open fp-alice opened 5 years ago
I'm not sure I would actually recommend this unless your goal is to support lots of MC versions at once. The ReplayMod (which is the main consumer of this lib) supports 1.7.10, 1.8, 1.8.9, 1.10.2, 1.11, 1.11.2, 1.12, 1.12.1, 1.12.2, (kinda 1.13.2) and 1.14, all from one code base (no branches or multiple copies of source code in different folders). Other than that, jGui's underlying architecture and layout engine aren't particularly nice and I would be surprised if there aren't Minecraft GUI libraries out there which have far better design.
It's also very much non-trivial to get integrated into your build since it isn't simply available as a maven artifact and has to support building with 5 different ForgeGradle versions and fabric-loom (as of 1.14). Be sure to check the ReplayMod's build scripts. Small side note: The 1.14 and 1.7.10 versions require some Mixins which are currently located in the ReplayMod repo. I intend to move the 1.14 mixins into this repo, I just haven't gotten to it (and also have been waiting for 1.14.2).
Being the main consumer, you can find lots of usage examples (including quite complex ones) in the ReplayMod's Gui*
classes, e.g. simple screen, more complex screen, adding to vanilla screen. It also uses most (all?) layouts and elements, just search for the one you're interested in.
I probably won't be adding any documentation in the code itself since this lib is mostly in bug-fixes-and-new-MC-version-only-mode for me.
This looks very interesting, and I would love to make use of it. Is there any chance of you including examples or other written documentation in the code?