mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-04-22 05:35:10 +00:00
Add setting to toggle sound effects (#568)
* Use soundPlayer object with setting * Style changes
This commit is contained in:
@@ -11,7 +11,6 @@ local bindingUtil = require(script.Parent.bindingUtil)
|
||||
|
||||
local Theme = require(Plugin.App.Theme)
|
||||
local Assets = require(Plugin.Assets)
|
||||
local playSound = require(Plugin.playSound)
|
||||
|
||||
local BorderedContainer = require(Plugin.App.Components.BorderedContainer)
|
||||
|
||||
@@ -53,7 +52,7 @@ function Notification:didMount()
|
||||
})
|
||||
)
|
||||
|
||||
playSound(Assets.Sounds.Notification)
|
||||
self.props.soundPlayer:play(Assets.Sounds.Notification)
|
||||
|
||||
self.timeout = task.spawn(function()
|
||||
local clock = os.clock()
|
||||
@@ -182,6 +181,7 @@ function Notifications:render()
|
||||
|
||||
for index, notif in ipairs(self.props.notifications) do
|
||||
notifs[notif] = e(Notification, {
|
||||
soundPlayer = self.props.soundPlayer,
|
||||
text = notif.text,
|
||||
timestamp = notif.timestamp,
|
||||
timeout = notif.timeout,
|
||||
|
||||
Reference in New Issue
Block a user