Skytils / SkytilsMod

Skytils is a Hypixel Skyblock mod! Be careful, malicious copies are distributed across GitHub. Confirm on discord.gg/skytils (807302538558308352)
https://hypixel.net/threads/3856202/
GNU Affero General Public License v3.0
1.04k stars 423 forks source link

Add hud text shadow configuration #432

Closed RectangularObject closed 5 months ago

RectangularObject commented 7 months ago

Hooray for a pr on a suggestion made 2 years ago! image This replaces the spam text shadow config with an option to change all hud text shadows, and will allow skytils' hud elements to match other mods, such as Apec. Also cleaned up the code a bit using intellij's "Reformat Code" function.

Ideally, I would've liked to implement config options to change each hud element's font shadow individually, but oh well! This'll do for now. Maybe I'll do that whenever I find the motivation to.

RectangularObject commented 7 months ago

Reverted the cleanup since it's not really related to the pr, I'm assuming @Sychic or @My-Name-Is-Jeff will clean up the code in a future commit.

Sychic commented 7 months ago

Hey, thanks for the PR. While this is a solution to the problem, a preferred solution would be to provide configuration for each gui element separately. This could be achieved by adding a field to the base GuiElement class and reading from there. Toggling the option could then be handled by right clicking the element.

RectangularObject commented 7 months ago

Toggling the option could then be handled by right clicking the element.

Huh, I didn't think of this. I'll work on it.

Sychic commented 7 months ago

If you do, please try to use an elementa state to contain the value so it's easier to migrate later.

RectangularObject commented 7 months ago

Well, there we go. It works, you can go into the configuration file and change every element's text shadow setting individually. Now I just have to figure out how to change that setting in-game using a right or middle click on the element. Is it a bad time to say that I've never really used Kotlin or Java before? Running off of pure intuition here. I'll have to look into how to actually use elementa tomorrow; I don't know much about it. It looks interesting!

My-Name-Is-Jeff commented 7 months ago

Well, there we go. It works, you can go into the configuration file and change every element's text shadow setting individually. Now I just have to figure out how to change that setting in-game using a right or middle click on the element. Is it a bad time to say that I've never really used Kotlin or Java before? Running off of pure intuition here. I'll have to look into how to actually use elementa tomorrow; I don't know much about it. It looks interesting!

https://github.com/Skytils/SkytilsMod/blob/7a741404e010ba19f6b52477341b5720e31c04a7/src/main/kotlin/gg/skytils/skytilsmod/gui/LocationEditGui.kt#L105-L113

RectangularObject commented 7 months ago

Cool, it works. textShadow-preview-optimized

RectangularObject commented 7 months ago

Is this still being looked at?

My-Name-Is-Jeff commented 6 months ago

Is this still being looked at?

Forgot about it ngl will review rn

pull-request-quantifier-deprecated[bot] commented 5 months ago

This PR has 177 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

``` Label : Medium Size : +95 -82 Percentile : 55.4% Total files changed: 24 Change summary by file extension: .kt : +95 -82 ``` > Change counts above are quantified counts, based on the [PullRequestQuantifier customizations](https://github.com/microsoft/PullRequestQuantifier/blob/main/docs/prquantifier-yaml.md).

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a balance between between PR complexity and PR review overhead. PRs within the optimal size (typical small, or medium sized PRs) mean: - Fast and predictable releases to production: - Optimal size changes are more likely to be reviewed faster with fewer iterations. - Similarity in low PR complexity drives similar review times. - Review quality is likely higher as complexity is lower: - Bugs are more likely to be detected. - Code inconsistencies are more likely to be detected. - Knowledge sharing is improved within the participants: - Small portions can be assimilated better. - Better engineering practices are exercised: - Solving big problems by dividing them in well contained, smaller problems. - Exercising separation of concerns within the code changes. #### What can I do to optimize my changes - Use the PullRequestQuantifier to quantify your PR accurately - Create a context profile for your repo using the [context generator](https://github.com/microsoft/PullRequestQuantifier/releases) - Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the `Excluded` section from your `prquantifier.yaml` context profile. - Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your `prquantifier.yaml` context profile. - Only use the labels that matter to you, [see context specification](./docs/prquantifier-yaml.md) to customize your `prquantifier.yaml` context profile. - Change your engineering behaviors - For PRs that fall outside of the desired spectrum, review the details and check if: - Your PR could be split in smaller, self-contained PRs instead - Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR). #### How to interpret the change counts in git diff output - One line was added: `+1 -0` - One line was deleted: `+0 -1` - One line was modified: `+1 -1` (git diff doesn't know about modified, it will interpret that line like one addition plus one deletion) - Change percentiles: Change characteristics (addition, deletion, modification) of this PR in relation to all other PRs within the repository.


Was this comment helpful? :thumbsup:  :ok_hand:  :thumbsdown: (Email) Customize PullRequestQuantifier for this repository.