@@ -718,13 +718,53 @@ local function SetupChatColors(parent)
718718 return container
719719end
720720
721+ local function SetupNotifications (parent )
722+ local container = CreateFrame (" Frame" , nil , parent )
723+
724+ local allFrames = {}
725+
726+ local whisperDropdown = addonTable .CustomiseDialog .Components .GetBasicDropdown (container , addonTable .Locales .WHISPER_SOUNDS , function (value )
727+ return addonTable .Config .Get (addonTable .Config .Options .WHISPER_SOUNDS ) == value
728+ end , function (value )
729+ addonTable .Config .Set (addonTable .Config .Options .WHISPER_SOUNDS , value )
730+ end )
731+ whisperDropdown :SetPoint (" TOP" )
732+ do
733+ local entries = {
734+ addonTable .Locales .FIRST_MESSAGE ,
735+ addonTable .Locales .ALL_MESSAGES ,
736+ }
737+ local values = {
738+ " first" ,
739+ " all"
740+ }
741+ whisperDropdown :Init (entries , values )
742+ end
743+ table.insert (allFrames , whisperDropdown )
744+
745+ container :SetScript (" OnShow" , function ()
746+ for _ , f in ipairs (allFrames ) do
747+ if f .SetValue then
748+ if f .option then
749+ f :SetValue (addonTable .Config .Get (f .option ))
750+ else
751+ f :SetValue ()
752+ end
753+ end
754+ end
755+ end )
756+
757+ return container
758+ end
759+
721760local TabSetups = {
722761 {name = GENERAL , callback = SetupGeneral },
723762 {name = addonTable .Locales .THEME , callback = SetupThemes },
724763 {name = addonTable .Locales .LAYOUT , callback = SetupLayout },
725764 {name = addonTable .Locales .DISPLAY , callback = SetupDisplay },
726765 {name = addonTable .Locales .MESSAGE_COLORS , callback = SetupChatColors },
727766 {name = addonTable .Locales .FORMATTING , callback = SetupFormatting },
767+ {name = addonTable .Locales .NOTIFICATIONS , callback = SetupNotifications },
728768}
729769
730770function addonTable .CustomiseDialog .Toggle ()
@@ -738,7 +778,7 @@ function addonTable.CustomiseDialog.Toggle()
738778 frame :SetToplevel (true )
739779 customisers [addonTable .Config .Get (addonTable .Config .Options .CURRENT_SKIN )] = frame
740780 table.insert (UISpecialFrames , frame :GetName ())
741- frame :SetSize (600 , 700 )
781+ frame :SetSize (700 , 700 )
742782 frame :SetPoint (" CENTER" )
743783 frame :Raise ()
744784
0 commit comments