diff --git a/LAddMin.lua b/LAddMin.lua
index 322f55e..63860bb 100644
--- a/LAddMin.lua
+++ b/LAddMin.lua
@@ -63,219 +63,218 @@ local excludeList = {
-------------------------------------------------------------------------------
-- FAKE_LAM1 functions --------------------------------------------------------
-------------------------------------------------------------------------------
-do
- -- LAM1:CreateControlPanel(controlPanelID, controlPanelName)
- function FAKE_LAM1:CreateControlPanel(controlPanelID, controlPanelName)
- local name = controlPanelName:gsub("|[cC]%w%w%w%w%w%w",""):gsub("|[rR]","")
-
- for i,v in ipairs(excludeList) do
- if controlPanelID == v then
- return LAM1:CreateControlPanel(controlPanelID, name)
- end
- end
- if panelIDs[name] ~= nil then
- return panelIDs[name]
+-- LAM1:CreateControlPanel(controlPanelID, controlPanelName)
+function FAKE_LAM1:CreateControlPanel(controlPanelID, controlPanelName)
+ local name = controlPanelName:gsub("|[cC]%w%w%w%w%w%w",""):gsub("|[rR]","")
+
+ for i,v in ipairs(excludeList) do
+ if controlPanelID == v then
+ return LAM1:CreateControlPanel(controlPanelID, name)
end
+ end
- local panelID = #settingsTable + 1001
- panelIDs[name] = panelID
+ if panelIDs[name] ~= nil then
+ return panelIDs[name]
+ end
+
+ local panelID = #settingsTable + 1001
+ panelIDs[name] = panelID
- local panelTable = {
- name = name,
- displayName = controlPanelName,
- controls = {},
- }
+ local panelTable = {
+ name = name,
+ displayName = controlPanelName,
+ controls = {},
+ }
- settingsTable[panelID - 1000] = panelTable
+ settingsTable[panelID - 1000] = panelTable
- LAM2:RegisterAddonPanel(controlPanelID, panelTable)
- LAM2:RegisterOptionControls(controlPanelID, panelTable.controls)
+ LAM2:RegisterAddonPanel(controlPanelID, panelTable)
+ LAM2:RegisterOptionControls(controlPanelID, panelTable.controls)
- return panelID
+ return panelID
+end
+-- LAM1:AddHeader(panelID, controlName, text)
+function FAKE_LAM1:AddHeader(panelID, controlName, text)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddHeader(panelID, controlName, text)
end
- -- LAM1:AddHeader(panelID, controlName, text)
- function FAKE_LAM1:AddHeader(panelID, controlName, text)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddHeader(panelID, controlName, text)
- end
- local controlTable = {
- type = "header",
- name = text,
- reference = controlName,
- }
+ local controlTable = {
+ type = "header",
+ name = text,
+ reference = controlName,
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab]
+ return tab[#tab]
+end
+-- LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
+function FAKE_LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
end
- -- LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
- function FAKE_LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddSlider(panelID, controlName, text, tooltip, minValue, maxValue, step, getFunc, setFunc, warning, warningText)
- end
- local controlTable = {
- type = "slider",
- name = text,
- tooltip = tooltip,
- min = minValue,
- max = maxValue,
- step = step,
- getFunc = getFunc,
- setFunc = setFunc,
- warning = warningText,
- reference = controlName,
- }
-
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
-
- return tab[#tab]
+ local controlTable = {
+ type = "slider",
+ name = text,
+ tooltip = tooltip,
+ min = minValue,
+ max = maxValue,
+ step = step,
+ getFunc = getFunc,
+ setFunc = setFunc,
+ warning = warningText,
+ reference = controlName,
+ }
+
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
+
+ return tab[#tab]
+end
+-- LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
+function FAKE_LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
end
- -- LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
- function FAKE_LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddDropdown(panelID, controlName, text, tooltip, validChoices, getFunc, setFunc, warning, warningText)
- end
- local controlTable = {
- type = "dropdown",
- name = text,
- tooltip = tooltip,
- choices = validChoices,
- getFunc = getFunc,
- setFunc = setFunc,
- warning = warningText,
- reference = controlName,
- }
-
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
-
- return tab[#tab]
+ local controlTable = {
+ type = "dropdown",
+ name = text,
+ tooltip = tooltip,
+ choices = validChoices,
+ getFunc = getFunc,
+ setFunc = setFunc,
+ warning = warningText,
+ reference = controlName,
+ }
+
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
+
+ return tab[#tab]
+end
+-- LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
+function FAKE_LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
end
- -- LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- function FAKE_LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddCheckbox(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- end
- local controlTable = {
- type = "checkbox",
- name = text,
- tooltip = tooltip,
- getFunc = getFunc,
- setFunc = setFunc,
- warning = warningText,
- reference = controlName,
- }
+ local controlTable = {
+ type = "checkbox",
+ name = text,
+ tooltip = tooltip,
+ getFunc = getFunc,
+ setFunc = setFunc,
+ warning = warningText,
+ reference = controlName,
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab]
+ return tab[#tab]
+end
+-- LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
+function FAKE_LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
end
- -- LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- function FAKE_LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddColorPicker(panelID, controlName, text, tooltip, getFunc, setFunc, warning, warningText)
- end
- local controlTable = {
- type = "colorpicker",
- name = text,
- tooltip = tooltip,
- getFunc = getFunc,
- setFunc = setFunc,
- warning = warningText,
- reference = controlName,
- }
+ local controlTable = {
+ type = "colorpicker",
+ name = text,
+ tooltip = tooltip,
+ getFunc = getFunc,
+ setFunc = setFunc,
+ warning = warningText,
+ reference = controlName,
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab]
+ return tab[#tab]
+end
+-- LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
+function FAKE_LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
end
- -- LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
- function FAKE_LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddEditBox(panelID, controlName, text, tooltip, isMultiLine, getFunc, setFunc, warning, warningText)
- end
- local controlTable = {
- type = "editbox",
- name = text,
- tooltip = tooltip,
- getFunc = getFunc,
- setFunc = setFunc,
- isMultiline = isMultiLine,
- warning = warningText,
- reference = controlName,
- }
-
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
-
- return tab[#tab]
+ local controlTable = {
+ type = "editbox",
+ name = text,
+ tooltip = tooltip,
+ getFunc = getFunc,
+ setFunc = setFunc,
+ isMultiline = isMultiLine,
+ warning = warningText,
+ reference = controlName,
+ }
+
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
+
+ return tab[#tab]
+end
+-- LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
+function FAKE_LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
end
- -- LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
- function FAKE_LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddButton(panelID, controlName, text, tooltip, onClick, warning, warningText)
- end
- local controlTable = {
- type = "button",
- name = text,
- tooltip = tooltip,
- func = onClick,
- warning = warningText,
- reference = controlName,
- }
+ local controlTable = {
+ type = "button",
+ name = text,
+ tooltip = tooltip,
+ func = onClick,
+ warning = warningText,
+ reference = controlName,
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab]
+ return tab[#tab]
+end
+-- LAM1:AddDescription(panelID, controlName, text, titleText)
+function FAKE_LAM1:AddDescription(panelID, controlName, text, titleText)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddDescription(panelID, controlName, text, titleText)
end
- -- LAM1:AddDescription(panelID, controlName, text, titleText)
- function FAKE_LAM1:AddDescription(panelID, controlName, text, titleText)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddDescription(panelID, controlName, text, titleText)
- end
- local controlTable = {
- type = "description",
- title = titleText,
- text = text,
- reference = controlName,
- }
+ local controlTable = {
+ type = "description",
+ title = titleText,
+ text = text,
+ reference = controlName,
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab]
+ return tab[#tab]
+end
+-- LAM1:AddSubMenu(panelID, controlName, text, tooltip)
+function FAKE_LAM1:AddSubMenu(panelID, controlName, text, tooltip)
+ if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
+ return LAM1:AddSubMenu(panelID, controlName, text, tooltip)
end
- -- LAM1:AddSubMenu(panelID, controlName, text, tooltip)
- function FAKE_LAM1:AddSubMenu(panelID, controlName, text, tooltip)
- if type(panelID) == "userdata" or (type(panelID) == "number" and panelID < 1000) then
- return LAM1:AddSubMenu(panelID, controlName, text, tooltip)
- end
- local controlTable = {
- type = "submenu",
- name = text,
- tooltip = tooltip,
- reference = controlName,
- controls = {},
- }
+ local controlTable = {
+ type = "submenu",
+ name = text,
+ tooltip = tooltip,
+ reference = controlName,
+ controls = {},
+ }
- local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
- table.insert(tab, controlTable)
+ local tab = type(panelID) == "table" and panelID or settingsTable[panelID - 1000].controls
+ table.insert(tab, controlTable)
- return tab[#tab].controls
- end
+ return tab[#tab].controls
end