Skip to content

Commit

Permalink
Now compatible with TinyInspect
Browse files Browse the repository at this point in the history
  • Loading branch information
Larsj02 committed May 19, 2024
1 parent 748befd commit 697ea8a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
"RunNextFrame",
"CharacterFrameBg",
"UIDropDownMenu_SetSelectedID",
"UIDropDownMenu_GetSelectedName"
"UIDropDownMenu_GetSelectedName",
"PaperDollFrame"
]
}
18 changes: 14 additions & 4 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ local function createFrame()
gems:SetTitle(const.ADDON_NAME)
gems:RegisterEvent("BAG_UPDATE_DELAYED")
gems:SetWidth(300)
gems:SetPoint("BOTTOMLEFT", CharacterFrame, "BOTTOMRIGHT")
gems:SetPoint("TOPLEFT", CharacterFrame, "TOPRIGHT")

local frameToggle = CreateFrame("Frame", nil, CharacterFrame)
frameToggle:SetFrameStrata("HIGH")
Expand Down Expand Up @@ -332,11 +330,23 @@ local function createFrame()
end)
gems:SetScript("OnShow", function(self)
selectionTreeUpdate()
if _G["CCSf"] then -- Chonky Character Sheets Frame
-- Chonky Character Sheets Frame
if _G["CCSf"] then
self:ClearAllPoints()
self:SetPoint("BOTTOMLEFT", CharacterFrameBg, "BOTTOMRIGHT")
self:SetPoint("TOPLEFT", CharacterFrameBg, "TOPRIGHT")
self:SetWidth(1000)
self.defaultPosition = false
-- TinyInspect
elseif C_AddOns.IsAddOnLoaded("TinyInspect") and PaperDollFrame.inspectFrame and PaperDollFrame.inspectFrame:IsVisible() then
self:ClearAllPoints()
self:SetPoint("BOTTOMLEFT", PaperDollFrame.inspectFrame, "BOTTOMRIGHT")
self:SetPoint("TOPLEFT", PaperDollFrame.inspectFrame, "TOPRIGHT")
self.defaultPosition = false
elseif not self.defaultPosition then
self:ClearAllPoints()
self:SetPoint("BOTTOMLEFT", CharacterFrame, "BOTTOMRIGHT")
self:SetPoint("TOPLEFT", CharacterFrame, "TOPRIGHT")
self.defaultPosition = true
end
end)
end
Expand Down
2 changes: 2 additions & 0 deletions UIElements.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function uiElements:CreateCheckButton(parent, data)
local checkButton = CreateFrame("CheckButton", nil, parent, "ChatConfigCheckButtonTemplate")
---@diagnostic disable-next-line: deprecated
checkButton:SetPoint(unpack(data.point))
checkButton.Text:SetFontObject(const.FONT_OBJECTS.NORMAL)
checkButton.Text:SetPoint("LEFT", checkButton, "RIGHT")
checkButton.Text:SetText(data.text)
checkButton.tooltip = data.tooltip
checkButton:HookScript("OnClick", data.onClick)
Expand Down

0 comments on commit 697ea8a

Please sign in to comment.