Compare commits
3 Commits
e85c14ea45
...
3.12.0
Author | SHA1 | Date | |
---|---|---|---|
e6525c6443 | |||
dfd2064a40 | |||
dfe5b94780 |
68
Heimdall.lua
68
Heimdall.lua
@@ -2,7 +2,7 @@ local addonname, shared = ...
|
||||
---@cast shared HeimdallShared
|
||||
---@cast addonname string
|
||||
|
||||
local VERSION = "3.11.0"
|
||||
local VERSION = "3.12.0"
|
||||
shared.VERSION = VERSION
|
||||
|
||||
local function init()
|
||||
@@ -745,3 +745,69 @@ loadedFrame:RegisterEvent("ADDON_LOADED")
|
||||
loadedFrame:SetScript("OnEvent", function(self, event, addonName)
|
||||
if addonName == addonname then init() 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
## Interface: 70300
|
||||
## Title: Heimdall
|
||||
## Version: 3.11.0
|
||||
## Version: 3.12.0
|
||||
## Notes: Watches over areas and alerts when hostiles spotted
|
||||
## Author: Cyka
|
||||
## SavedVariables: Heimdall_Data, Heimdall_Achievements
|
||||
|
2
Meta
2
Meta
Submodule Meta updated: e045572f60...e0b57e39fc
Reference in New Issue
Block a user