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 media custom option #4218

Merged
merged 4 commits into from
Jan 15, 2023
Merged

add media custom option #4218

merged 4 commits into from
Jan 15, 2023

Conversation

emptyrivers
Copy link
Contributor

Fixes #1102

@emptyrivers emptyrivers added the 🎨 Enhancement This pull request implements a new feature. label Jan 8, 2023
WeakAurasOptions/AuthorOptions.lua Show resolved Hide resolved
WeakAurasOptions/AuthorOptions.lua Show resolved Hide resolved
WeakAurasOptions/AuthorOptions.lua Show resolved Hide resolved
@mrbuds
Copy link
Contributor

mrbuds commented Jan 9, 2023

suggested changes work only in Author Mode

@emptyrivers
Copy link
Contributor Author

took the liberty of having the selected sound play once (on both author mode when choosing default, and in user mode)

@InfusOnWoW
Copy link
Contributor

I pushed two things to this branch now:

a) PlaySound playing on the master channel, because that works even if the sound is muted and is something we do for Actions/Conditions

b) A bigger rework of how FramTick/TimerTick work.

--- @field Notify fun(self: SubscribableObject, event: type, ...: any)
--- @field HasSubscribers fun(self: SubscribableObject, event: string): boolean
--- @type SubscribableObject
local SubscribableObject =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless im mistaken, this feels like it's also some groundwork for #3875?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, I'm not actually sure if it will be. It does tick some boxes, but also quite a few things are different from what they would need to be.

For TimerTick sub elements and the region itself now subscribe to the
TimerTick event. The first to subscribe/last to unsubscribe causes the
region to install/remove an OnUpdate handler.

The high priority flag gurantees that the region gets the TimerTick
first, even though I'm unsure whether that's actually required, but it
keeps the same behaviour.

A better system for ordering subscribers will be needed at some point.

For FrameTicks the system has now two layers. The base is
Private.FrameTick, which if there are any subscribers installs an
OnUpdate handler.

Each region subscribes to Private.FrameTick if there are subscribers to
their FrameTick.

Also factor out the code into a separate file.
@Stanzilla
Copy link
Contributor

@emptyrivers any last words?

@Stanzilla Stanzilla merged commit 715ce5a into WeakAuras:main Jan 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎨 Enhancement This pull request implements a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

custom options could use a sound option
4 participants