3 Commits

Author SHA1 Message Date
e6525c6443 Release 3.12.0 2025-05-20 18:43:24 +02:00
dfd2064a40 Implement chat copy frame 2025-05-20 18:43:10 +02:00
dfe5b94780 Update subproject commit reference in Meta 2025-05-18 15:16:26 +02:00
3 changed files with 69 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ local addonname, shared = ...
---@cast shared HeimdallShared ---@cast shared HeimdallShared
---@cast addonname string ---@cast addonname string
local VERSION = "3.11.0" local VERSION = "3.12.0"
shared.VERSION = VERSION shared.VERSION = VERSION
local function init() local function init()
@@ -745,3 +745,69 @@ loadedFrame:RegisterEvent("ADDON_LOADED")
loadedFrame:SetScript("OnEvent", function(self, event, addonName) loadedFrame:SetScript("OnEvent", function(self, event, addonName)
if addonName == addonname then init() end if addonName == addonname then init() end
end) end)
-- Create the import/export frame
local ccpFrame = CreateFrame("Frame", "CCPFrame", UIParent)
ccpFrame:SetSize(512 * 1.5, 512 * 1.5)
ccpFrame:SetPoint("CENTER")
ccpFrame:SetFrameStrata("HIGH")
ccpFrame:EnableMouse(true)
ccpFrame:SetMovable(true)
ccpFrame:SetResizable(false)
ccpFrame:SetBackdrop({
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true,
tileSize = 4,
edgeSize = 4,
insets = {
left = 4,
right = 4,
top = 4,
bottom = 4,
},
})
ccpFrame:SetBackdropColor(0, 0, 0, 0.8)
ccpFrame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
ccpFrame:SetMovable(true)
ccpFrame:EnableMouse(true)
ccpFrame:RegisterForDrag("LeftButton")
ccpFrame:SetScript("OnDragStart", function(self) self:StartMoving() end)
ccpFrame:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
ccpFrame:SetScript("OnShow", function(self) self:SetScale(1) end)
ccpFrame:Hide()
-- Create scroll frame
local scrollFrame = CreateFrame("ScrollFrame", "CCPFrameScrollFrame", ccpFrame, "UIPanelScrollFrameTemplate")
scrollFrame:SetPoint("TOPLEFT", ccpFrame, "TOPLEFT", 10, -10)
scrollFrame:SetPoint("BOTTOMRIGHT", ccpFrame, "BOTTOMRIGHT", -30, 10)
-- Create the text box
local ccpFrameTextBox = CreateFrame("EditBox", "CCPFrameTextBox", scrollFrame)
ccpFrameTextBox:SetSize(512 * 1.5 - 40, 512 * 1.5 - 20)
ccpFrameTextBox:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, 0)
ccpFrameTextBox:SetFont("Fonts\\FRIZQT__.ttf", 12)
ccpFrameTextBox:SetTextColor(1, 1, 1, 1)
ccpFrameTextBox:SetTextInsets(10, 10, 10, 10)
ccpFrameTextBox:SetMultiLine(true)
ccpFrameTextBox:SetAutoFocus(true)
ccpFrameTextBox:SetMaxLetters(1000000)
ccpFrameTextBox:SetScript("OnEscapePressed", function(self) ccpFrame:Hide() end)
-- Set the scroll frame's scroll child
scrollFrame:SetScrollChild(ccpFrameTextBox)
CCP = function(window)
window = window or 1
local charFrame = _G["ChatFrame" .. window]
local maxLines = charFrame:GetNumMessages() or 0
local chat = {}
for i = 1, maxLines do
local currentMsg = charFrame:GetMessageInfo(i)
chat[#chat + 1] = currentMsg
end
ccpFrameTextBox:SetText(table.concat(chat, "\n"))
ccpFrame:Show()
ccpFrameTextBox:SetFocus()
end

View File

@@ -1,6 +1,6 @@
## Interface: 70300 ## Interface: 70300
## Title: Heimdall ## Title: Heimdall
## Version: 3.11.0 ## Version: 3.12.0
## Notes: Watches over areas and alerts when hostiles spotted ## Notes: Watches over areas and alerts when hostiles spotted
## Author: Cyka ## Author: Cyka
## SavedVariables: Heimdall_Data, Heimdall_Achievements ## SavedVariables: Heimdall_Data, Heimdall_Achievements

2
Meta

Submodule Meta updated: e045572f60...e0b57e39fc