Skip to content

Add Customizable timers, notification display time and corner icon - #180

Open
JoeSchubert wants to merge 4 commits into
blish-hud:masterfrom
JoeSchubert:master
Open

Add Customizable timers, notification display time and corner icon#180
JoeSchubert wants to merge 4 commits into
blish-hud:masterfrom
JoeSchubert:master

Conversation

@JoeSchubert

Copy link
Copy Markdown

Discussion Reference

I am unsure where to discuss on discord to provide a discord link per the example as I do not see a Contributing.md or anything similar. However, this discussion is covered by the changes in this PR:
#163

Is this a breaking change?

Breaking changes require additional review prior to merging. If you answer yes, please explain what breaking changes have been made.

No

This PR adds the following:

  • Customizable global time for reminder - defaults to the existing 15 minutes.
  • Customizable Global time for notifications - defaults to the existing 15 seconds
  • Add a corner icon - Left clicking shows the notifications, or renews the display timer if they're already showing. Right Clicking shows the upcoming events in the menu instead.
  • Adds an option to show/hide the corner icon. It currently defaults to being shown. Uses the existing Eye icon.
  • In the Events settings, it allows editing the existing default times from the json in a box to the left of the time. This will show the current default time from the json. Multiple notification timers can be added by being comma separated.

I've done basic testing and everything seems to work as intended.

- Added static list to track active EventNotification objects
- Introduced ClearAll() to properly dispose existing notifications before spawning new ones
- Ensured proper memory management and garbage collection by hooking DisposeControl()
- Migrated global notification settings from the Events tab to the BasicSettingsView
- Replaced the hard-to-use TrackBar with a TextBox for exact notification duration
- Added integer validation for the duration text box
- Introduced LastFiredAlertThreshold to replace boolean HasAlerted flag, preventing duplicate alerts for the same time threshold
- Implemented logic to fetch and parse custom time strings on a per-event basis
- Merged module default thresholds, JSON-provided event reminders, and user-provided custom times into a unified HashSet to ensure all necessary alerts trigger sequentially
- Added text boxes next to each event in the main Events & Metas tab to allow defining custom reminder times
- Pinned text box UI locations to prevent layout engine overlapping
- Replaced hardcoded Corner Icon texture with native Watch (eye) texture
- Refactored Corner Icon logic to dynamically create and dispose itself when toggled, freeing up Blish HUD UI slots
- Fixed context menu left/right click behaviors to strictly display upcoming tracked events
- Bumped manifest version
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.

1 participant