raphaelgoulart / ya_inputdisplay

Yet another input display for Clone Hero / YARG
16 stars 3 forks source link

Config V2 (yes) #19

Closed SkyJumper409x closed 2 months ago

SkyJumper409x commented 2 months ago

So this is a lot of stuff Config v2 started as mostly a naming changes thing, and like fixing a bug. Apparently I felt like spending more time on this so I made a full Configuration UI. This aims to obsolete manually editing the config. This sorta fixes #15 because the config shouldn't be directly edited anymore anyway.

This needs a lot of testing because of the amount of stuff it has. I tried chopping it up into smaller pieces, but as it basically restructures everything config related, that was just not happening.

The significant additions:

A lot has been moved out of Singleton.gd, but it is still used for various things that require a Global variable. It also calls ConfigHandler.save_config(2) before exiting. Oh, about that. The program will no longer automatically quit when the User attempts to close the window. This is mostly to ensure the config can be saved properly.

I attached the file cfg_v2_syntax.txt to this PR, i used it for keeping track of the config differences. It might not be up to date with the code entirely, but it should give a rough idea of the new structure.

Yea this somehow turned into 9 commits idk its probably more like 5 but that isn't much better is it. This literally was way too complicated I had the Godot docs open all the time while coding but it is done now.

raphaelgoulart commented 2 months ago

I'll be testing this over the weekend, and hopefully enlisting others to test as well! Thank you very much for your hard work!

SkyJumper409x commented 2 months ago

okay! I made a mac build for a friend of mine before, she will test the mac config v2 build too when she has the time.

SkyJumper409x commented 2 months ago

Thank you very much for your hard work!

I wanted to fix bugs that annoyed me and decided it would be easier to just start from 0. It really is as shrimple as that :3

raphaelgoulart commented 2 months ago

Found one minor issue in my brief testing:

Otherwise, looking/feeling pretty good so far!

SkyJumper409x commented 2 months ago

huh, the always show hamburger button should be loaded, i even pushed that recently. That is odd. Hamburger button not clickable anymore when hidden, i can look into that, but for now yeah i can add it to the readme.

I didnt change too much in the readme anyways, since i felt like it would be good to have it be up to date with the latest release.

raphaelgoulart commented 2 months ago

No problem, in fact I intend on creating a new release once this is approved, I've had a few people test this and it worked fine apart from what I mentioned

SkyJumper409x commented 2 months ago

The recently pushed commits should address the issues you mentioned. If a Control is hidden with the hide() function, the mouse_entered and mouse_exited signals are no longer emitted. I now use the modulate.a property (which is the alpha channel of the modulate Color to hide/show the button. As it is a float value ranging from 0 to 1, instead of a bool, I was able to add fade in/out to the hiding/showing of the button. Also, the hamburger button will show regardless of always_show_hamburger if the user hovers over it. I apparently forgot to add code that hides the button in the _read() function if always_show_hamburger is false, woops. That code was added now.

SkyJumper409x commented 2 months ago

No problem, in fact I intend on creating a new release once this is approved, I've had a few people test this and it worked fine apart from what I mentioned

In that case, I will update the Readme to fit the new stuff. Should I do so in a seperate PR once the new version is released, or add it to this PR?

raphaelgoulart commented 2 months ago

In that case, I will update the Readme to fit the new stuff. Should I do so in a seperate PR once the new version is released, or add it to this PR?

Add it to this one, please

SkyJumper409x commented 2 months ago

object leak on exit is simple, ConfigHandler.current_config needed to be free()'d manually upon program exit.

SkyJumper409x commented 2 months ago

As for the readme, I moved the FAQ-like section up as solutions for common issues should be easy to find. The "Controls" and "Settings" sections were updated. "Settings" has a subsection with the info for release 0.0.4 and prior.

raphaelgoulart commented 2 months ago

Ok; let me know once you feel this is 100% and I'll do another round of testing, then merge

SkyJumper409x commented 2 months ago

i feel it is 100% now i was ADHD'ing the readme, thats why its like 3 commits :sweat_smile: u can merge now unless theres an issue