CreativeMD / CreativeCore

Required by AmbientSounds, ItemPhysic, LittleTiles, ...
GNU Lesser General Public License v3.0
56 stars 35 forks source link

CC cleanup + GuiAPI features #196

Closed SrRapero720 closed 4 months ago

SrRapero720 commented 7 months ago

I open as a draft because i want to keep public all changes i made and get review more fast while is on dev, instead of masively change things, get reviewed negatively and then drop all and start again from scrap, so i preffer do small step until reach the biggest change. My plan on GuiAPI is add a lot of things, leading in a lot of breaking changes, including changes on other parts like package relocation not backported on 1.19.2 -> 1.20.1

Btw, this needs a small gradle cleanup, because porting it to newest version without few gradle/code cleanup whould become a real nightmare

Current checklist of stuff to do

SrRapero720 commented 7 months ago

Starting with gradle, basic changes

i upgrade Forge toolchaing, and make all forge resources dynamic, using all gradle.properties instead of manually defining on it. Witch includes license, mod id, mod name, mod description and many other properties placed in gradle.properties also i rewrote archivesName into a more compat stringBuilder. basically can be more easier read it.

ValueDisplay

Is just a draft at the moment, first i need to implement it on slider class, i use that for WaterFrames seekbars and looks pretty cool I add blocks value too. image

CreativeMD commented 7 months ago

Looks good! If you want to port it even to 1.20.1 it will be a bit more difficult. I might adapt your changes myself, because a lot of stuff has changed since 1.18. We shall see. Really like the ValueDisplay so far!

SrRapero720 commented 7 months ago

Few features

  1. implemented ValueDisplay on GuiSlider
  2. Renamed some classes for consistency
  3. Implemented GuiSeekBar, acts like a seekbar, filled with a gray color when value got updated
SrRapero720 commented 7 months ago

Minor fix Using suggestion feature, always keeps rendering suggestion (even if textfield has text), this just change flag2 with a check for text (was empty) and suggesiton (wasn't empty)

SrRapero720 commented 7 months ago

i finish all features i have listed to implement.

scale was pretty simple, because is just scale pose stack, and also works on all subclasses of GuiLabel and preferredWidth is adapted to scale size. so its fine.

and relocate team.creative.creativecore.common.gui.handler to import team.creative.creativecore.common.gui.creator (like 1.19.2 and 1.20.x)

next on my list is perform minor fixes on GuiApi:

SrRapero720 commented 4 months ago

right now changes are OK and (i think) can be easier ported foward to 1.19.2, whoever. i see 1.20.1 solves many issues like nested spacing on groups (the most important fix i need)

this PR is ready to merge, whoever, i guess make a 1.20 backport to 1.18.2 can be a better option i will try it right now and see the result.