mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-21 12:01:38 +00:00
Add notification popups (#540)
* Add notifications prototype * Add timeout * Improve function name * Faster timeouts and fully clickable * Update remove padding from old X button * Only auto-dismiss when viewport is open * Start auto dismiss once viewed * Avoid redundantly displaying widget text as notifs * Add sound effect * Add setting for notifications * Remove duplicate PluginSettings.StudioProvider * Use short pop sound effect * Fix broken audio, thanks Roblox * Use e instead of createElement
This commit is contained in:
parent
f1cdf2fe79
commit
ca0759a011
9 changed files with 293 additions and 10 deletions
22
plugin/src/playSound.lua
Normal file
22
plugin/src/playSound.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
-- Roblox decided that sounds only play in Edit mode when parented to a plugin widget, for some reason
|
||||
local plugin = plugin or script:FindFirstAncestorWhichIsA("Plugin")
|
||||
local widget = plugin:CreateDockWidgetPluginGui("Rojo_soundPlayer", DockWidgetPluginGuiInfo.new(
|
||||
Enum.InitialDockState.Float,
|
||||
false, true,
|
||||
10, 10,
|
||||
10, 10
|
||||
))
|
||||
widget.Name = "Rojo_soundPlayer"
|
||||
widget.Title = "Rojo Sound Player"
|
||||
|
||||
return function(soundId)
|
||||
local sound = Instance.new("Sound")
|
||||
sound.SoundId = soundId
|
||||
sound.Parent = widget
|
||||
|
||||
sound.Ended:Connect(function()
|
||||
sound:Destroy()
|
||||
end)
|
||||
|
||||
sound:Play()
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue