Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Options: Slider page buttons, Completion progress bar fix #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

trigger-segfault
Copy link

@trigger-segfault trigger-segfault commented Jul 11, 2022

This PR mainly adds 2 new options, but also includes a few small fixes, and adds more info to the repo.

Testing has been done with all new options toggled on/off. And the original 2 options have been retested to confirm that they are still working correctly.

There are a few other refactors I'd like to make (like use of nameof syntax for all patches, and using a namespace for extensions instead of polluting global::), but they aren't worth shoving into this PR, since it modifies a lot more files.

Additions

  • Slider Page Buttons: Option to enable integer slider page button inputs. This allows moving slider controls in much larger increments (which is especially useful for other Centrifuge mods that add or make slider ranges very large).

  • Fix Completion Progress Bars: Option to sync ModeCompleteStatusMenuLogic components (the 0%-200% progress bars shown next to Arcade modes and Level Sets). This fixes an issue where scrolling one of these items into view would cause ALL components to restart from 0%, which created a ton of visual noise.

Fixes

  • Delete Playlist button no longer disappears when popping back into the LevelGridGrid menu (i.e. when Pressing Advanced view or Leaderboards, then going back). This fix is located in PushGrid.cs.
  • Switched from ToUpper() to ToUpperInvariant() for the hex color in CustomizeMenuCompoundData.cs.

Info

  • Added description and list of options to README.md.
  • Incremented version from 1.0.0.0 to 1.0.1.0.
  • Changed Title/Product from Distance.ModTemplate to Distance.MenuUtilities.
  • Changed copyright year to 2022.

Refactors

  • Switched from RuntimePatcher.AutoPatch() to RuntimePatcher.HarmonyInstance.PatchAll(Assembly.GetExecutingAssembly()) to avoid the silent catch-all.
  • Wrapped try-catches around Harmony.PatchAll() and CreateSettingsMenu(), in order to log what threw an error during initialization.
  • ConfigurationLogic options now use private const string's for their property IDs to avoid code duplication (using the real property name wouldn't be the best, in-case we want to rename it).

Additions:
* Option to enable integer slider page button inputs. This allows moving slider controls in much larger increments (which is especially useful for other Centrifuge mods that add or make slider ranges very large).
* Option to sync ModeCompleteStatusMenuLogic components (the 0%-200% progress bars shown next to Arcade modes and Level Sets). This fixes an issue where scrolling one of these items into view would cause ALL components to restart from 0%, which created a ton of visual noise.

Fixes:
* Delete Playlist button no longer disappears when popping back into the LevelGridGrid menu (i.e. when Pressing Advanced view or Leaderboards, then going back).
* Switched from `ToUpper()` to `ToUpperInvariant()` for the hex color in `CustomizeMenuCompoundData.cs`.

Info:
* Added description and list of options to `README.md`.
* Incremented version from `1.0.0.0` to `1.0.1.0`.
* Changed Title/Product from `Distance.ModTemplate` to `Distance.MenuUtilities`.
* Changed copyright year to 2022.

Refactors:
* Switched from `RuntimePatcher.AutoPatch()` to `RuntimePatcher.HarmonyInstance.PatchAll(Assembly.GetExecutingAssembly())` to avoid the silent catch-all.
* Wrapped try-catches around `Harmony.PatchAll()` and `CreateSettingsMenu()`, in order to log what threw an error during initialization.
* `ConfigurationLogic` options now use private const string's for their property IDs to avoid code duplication (using the real property name wouldn't be the best, in-case we want to rename it).
@REHERC REHERC self-assigned this Jul 11, 2022
* Removed leftover debug logging from testing that would spam the log file into oblivion.
* I considered this to be too invasive for awhile after making the PR, so I'm finally going back and changing the use of const string ID's for property names back to string literals.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants