Skip to content

Commit

Permalink
added to Options.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
N6REJ committed Jul 22, 2023
1 parent e542c50 commit b164aec
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BearsSwitcher.defaults = {
spkr1 = {}, -- default
spkr2 = {}, -- normally headset
toggle = GetBindingText("NUMPADMULTIPLY"), -- default keypress
music_toggle = GetBindingText("NUMPADDIVIDE"), -- default music keypress
Devices = {},
volumeUp = GetBindingText("NUMPADPLUS"),
volumeDown = GetBindingText("NUMPADMINUS"),
Expand Down Expand Up @@ -55,9 +56,9 @@ BearsSwitcher.options = {
BearsSwitcher.db.profile.spkr1 = value
-- Now that we have a value what do we do with it?
print(
"|cff00FF00Speaker 1 set to: |r|cffe3ff00 ",
Sound_GameSystem_GetOutputDriverNameByIndex(value - 1),
"|r"
"|cff00FF00Speaker 1 set to: |r|cffe3ff00 ",
Sound_GameSystem_GetOutputDriverNameByIndex(value - 1),
"|r"
)
end,
get = function(info)
Expand All @@ -74,9 +75,9 @@ BearsSwitcher.options = {
BearsSwitcher.db.profile.spkr2 = value
-- Now that we have a value what do we do with it?
print(
"|cff00FF00Speaker 2 set to: |r|cffe3ff00 ",
Sound_GameSystem_GetOutputDriverNameByIndex(value - 1),
"|r"
"|cff00FF00Speaker 2 set to: |r|cffe3ff00 ",
Sound_GameSystem_GetOutputDriverNameByIndex(value - 1),
"|r"
)
-- BearsSwitcher.db.profile.spkr2 = value
end,
Expand All @@ -98,7 +99,7 @@ BearsSwitcher.options = {
key = {
type = "keybinding",
order = 3,
name = "Toggle key",
name = "Speaker Toggle",
desc = "Key to use to switch audio devices",
get = function(info)
return GetBindingText(BearsSwitcher.db.profile.toggle)
Expand All @@ -109,9 +110,23 @@ BearsSwitcher.options = {
print("|cff00FF00Speaker toggle key set to: |r|cffe3ff00 ", GetBindingText(value), "|r")
end
},
volumeUp = {
key = {
type = "keybinding",
order = 4,
name = "Music Toggle",
desc = "Key to use to switch music on/off",
get = function(info)
return GetBindingText(BearsSwitcher.db.profile.music_toggle)
end,
set = function(info, value)
BearsSwitcher.db.profile.music_toggle = value or BearsSwitcher.db.profile.music_toggle
-- Now that we have a value what do we do with it?
print("|cff00FF00Music toggle key set to: |r|cffe3ff00 ", GetBindingText(value), "|r")
end
},
volumeUp = {
type = "keybinding",
order = 5,
name = "Volume Up",
desc = "Raise master volume",
get = function(info)
Expand All @@ -125,7 +140,7 @@ BearsSwitcher.options = {
},
volumeDown = {
type = "keybinding",
order = 5,
order = 6,
name = "Volume Down",
desc = "lower master volume",
get = function(info)
Expand Down

0 comments on commit b164aec

Please sign in to comment.