menu swap / color if there not default

added menu swap switcher to options
added extra check if unloaded item isnt same as the default table
removed odd bits of unused code
This commit is contained in:
Anch
2021-10-31 00:36:53 +13:00
parent 7493a00f2d
commit cbb2ac3d88
4 changed files with 57 additions and 44 deletions
+15
View File
@@ -49,6 +49,7 @@ function AtlasLootOptions_Init()
AtlasLootOptionsFrameItemAutoQuery:SetChecked(AtlasLoot.db.profile.ItemAutoQuery);
AtlasLootOptionsFrameOpaque:SetChecked(AtlasLoot.db.profile.Opaque);
AtlasLootOptionsFrameItemID:SetChecked(AtlasLoot.db.profile.ItemIDs);
AtlasLootOptionsFrameSubtablePosition:SetChecked(AtlasLoot.db.profile.SubtablePosition);
AtlasLootOptionsFrameItemSpam:SetChecked(AtlasLoot.db.profile.ItemSpam);
AtlasLootOptionsFrameLoDStartup:SetChecked(AtlasLoot.db.profile.LoadAllLoDStartup);
AtlasLootOptionsFrameHidePanel:SetChecked(AtlasLoot.db.profile.HidePanel);
@@ -66,6 +67,7 @@ function AtlasLootOptions_OnLoad()
AtlasLootOptionsFrameItemSyncTTText:SetText(AL["|cff9d9d9dItemSync Tooltips|r"]);
end
AtlasLootOptions_Init();
AtlasLootOptions_SubtablePositionToggle()
temp=AtlasLoot.db.profile.SafeLinks;
end
@@ -143,6 +145,19 @@ function AtlasLootOptions_ItemIDToggle()
AtlasLootOptions_Init();
end
function AtlasLootOptions_SubtablePositionToggle()
if AtlasLootOptionsFrameSubtablePosition:GetChecked() then
AtlasLootDefaultFrame_SubMenu2:SetPoint("TOP", 160, -40);
AtlasLootDefaultFrame_SubMenu:SetPoint("TOP", 0, -40);
AtlasLoot.db.profile.SubtablePosition = AtlasLootOptionsFrameSubtablePosition:GetChecked();
else
AtlasLootDefaultFrame_SubMenu:SetPoint("TOP", 160, -40);
AtlasLootDefaultFrame_SubMenu2:SetPoint("TOP", 0, -40);
AtlasLoot.db.profile.SubtablePosition = AtlasLootOptionsFrameSubtablePosition:GetChecked();
end
AtlasLootOptions_Init();
end
function AtlasLoot_SetupLootBrowserSlider(frame, mymin, mymax, step)
getglobal(frame:GetName().."Text"):SetText(AL["Loot Browser Scale: "].." ("..frame:GetValue()..")");
frame:SetMinMaxValues(mymin, mymax);