-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.lua
More file actions
33 lines (28 loc) · 1.34 KB
/
config.lua
File metadata and controls
33 lines (28 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
local name = ...
local frame = CreateFrame("Frame", name .. "ConfigFrame", InterfaceOptionsFramePanelContainer)
frame.name = name
frame:Hide()
frame:SetScript("OnShow", function(frame)
local title = frame:CreateFontString(nil, "ARTWORK", "GameFontNormalLarge")
title:SetPoint("TOPLEFT", 16, -16)
title:SetText("tooltipSimc Configuration")
local offHandConfig = CreateFrame("CheckButton", name .. "addOffHandButtonConfig", frame, "ChatConfigCheckButtonTemplate")
offHandConfig.Text:SetText("+ Off Hand")
offHandConfig:SetPoint("TOPLEFT", title, "BOTTOMLEFT", 0, -15)
offHandConfig:SetChecked(tooltipToSimcDB.offHand)
offHandConfig:SetScript("OnClick", function(self)
tooltipToSimcDB.offHand = self:GetChecked()
end)
if IsAddOnLoaded("Simulationcraft") then
local onlyItemConfig = CreateFrame("CheckButton", name.."onlyItemButtonConfig", frame, "ChatConfigCheckButtonTemplate")
onlyItemConfig.Text:SetText("Simc Integration")
onlyItemConfig:SetPoint("TOPLEFT", offHandConfig, "BOTTOMLEFT", 0, -5)
onlyItemConfig:SetChecked(tooltipToSimcDB.onlyItem)
onlyItemConfig:SetScript("OnClick", function(self)
tooltipToSimcDB.onlyItem = self:GetChecked()
end)
else
tooltipToSimcDB.onlyItem = true
end
end)
InterfaceOptions_AddCategory(frame)