from retail

This commit is contained in:
Bunny67
2022-05-19 22:04:17 +03:00
parent 9465daedd8
commit e7e789686a
86 changed files with 9118 additions and 5486 deletions
+24 -11
View File
@@ -56,25 +56,37 @@ local colorScheme = {
}
local function ConstructCodeReview(frame)
local group = AceGUI:Create("InlineGroup");
local group = AceGUI:Create("WeakAurasInlineGroup");
group.frame:SetParent(frame);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -17, 30);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 17, -10);
group.frame:SetPoint("TOPLEFT", frame, "TOPLEFT", 16, -16);
group.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -16, 46);
group.frame:Hide();
group:SetLayout("flow");
local title = AceGUI:Create("Label")
title:SetFontObject(GameFontNormalHuge)
title:SetFullWidth(true)
title:SetText(L["Custom Code Viewer"])
group:AddChild(title)
local codeTree = AceGUI:Create("TreeGroup");
codeTree:SetTreeWidth(300, false)
codeTree:SetFullWidth(true)
codeTree:SetFullHeight(true)
codeTree:SetLayout("flow")
codeTree.dragger:Hide()
codeTree.border:SetBackdrop(nil)
codeTree.content:SetAllPoints()
group.codeTree = codeTree;
group:SetLayout("fill");
group:AddChild(codeTree);
local codebox = AceGUI:Create("MultiLineEditBox");
codebox.frame:SetAllPoints(codeTree.content);
codebox.frame:SetFrameStrata("FULLSCREEN");
codebox:SetLabel("");
group:AddChild(codebox);
codebox:DisableButton(true)
codebox:SetFullWidth(true)
codebox:SetFullHeight(true)
codeTree:AddChild(codebox)
codebox.button:Hide();
IndentationLib.enable(codebox.editBox, colorScheme, 4);
local fontPath = SharedMedia:Fetch("font", "Fira Mono Medium");
if(fontPath) then
@@ -92,7 +104,7 @@ local function ConstructCodeReview(frame)
local cancel = CreateFrame("Button", nil, group.frame, "UIPanelButtonTemplate");
cancel:SetScript("OnClick", function() group:Close() end);
cancel:SetPoint("bottomright", frame, "bottomright", -27, 11);
cancel:SetPoint("BOTTOMRIGHT", -20, -24);
cancel:SetHeight(20);
cancel:SetWidth(100);
cancel:SetText(L["Okay"]);
@@ -102,16 +114,17 @@ local function ConstructCodeReview(frame)
return
end
local _, firstEntry = next(data)
self.data = data;
self.codeTree:SetTree(data);
self.codeTree:SelectByValue(firstEntry.value)
WeakAuras.ShowOptions();
frame.window = "codereview";
frame:UpdateFrameVisible()
end
function group.Close()
frame.window = "default";
frame.window = "update";
frame:UpdateFrameVisible()
end