Skip to content

Commit

Permalink
Added back Blizz options panel entry
Browse files Browse the repository at this point in the history
  • Loading branch information
d87 committed May 16, 2021
1 parent 7d1e036 commit ffeb1f5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
27 changes: 27 additions & 0 deletions Aptechka.lua
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ function Aptechka.PLAYER_LOGIN(self,event,arg1)
Aptechka:CreteMinimapIcon()
end

Aptechka:CreateBlizzOptionsPanel()
--[[
local f = CreateFrame('Frame', nil, InterfaceOptionsFrame)
f:SetScript('OnShow', function(self)
Expand Down Expand Up @@ -4110,3 +4111,29 @@ function Aptechka.UNIT_SPELLCAST_FAILED(self, event, unit, castID)
Aptechka:ForEachUnitFrame(unit, Frame_CastFailed, castID)
end
Aptechka.UNIT_SPELLCAST_INTERRUPTED = Aptechka.UNIT_SPELLCAST_FAILED


function Aptechka:CreateBlizzOptionsPanel()
local f = CreateFrame('Frame', "AptechkaBlizzOptionsPanel", InterfaceOptionsFrame)
f.name = "Aptechka"
InterfaceOptions_AddCategory(f);

local content = CreateFrame("Frame", "$parentContent", f)
content:SetPoint("TOPLEFT", 10, -10)
content:SetPoint("BOTTOMRIGHT", -10, 10)

local label = content:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
label:SetPoint("TOPLEFT", 10, -15)
label:SetPoint("BOTTOMRIGHT", content, "TOPRIGHT", 10, -45)
label:SetJustifyH("LEFT")
label:SetText("Aptechka Options")

local optionsButton = CreateFrame("Button", nil, content, "UIPanelButtonTemplate")
optionsButton:SetSize(200, 30)
optionsButton:SetPoint("TOPLEFT", 10, -60)
optionsButton:GetFontString():SetText("Open Options Panel")
optionsButton:SetScript("OnClick", function()
LoadAddOn('AptechkaOptions')
Aptechka:OpenGUI()
end)
end
4 changes: 3 additions & 1 deletion launcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,12 @@ function Aptechka:CreteMinimapIcon()

GameTooltip_SetTitle(tooltip, string.format("%s %s",addonName, GetAddOnMetadata(addonName, "version")))
GameTooltip_AddInstructionLine(tooltip, string.format("LeftClick - %s", L"Profile Settings"))
GameTooltip_AddInstructionLine(tooltip, string.format("Shift-LeftClick - %s", L"Widgets"))
GameTooltip_AddInstructionLine(tooltip, string.format("|cffc9e06cCtrl-LeftClick - %s|r", L"Unlock"))
--[[
GameTooltip_AddInstructionLine(tooltip, string.format("Shift-LeftClick - %s", L"Widgets"))
GameTooltip_AddInstructionLine(tooltip, string.format("RightClick - %s", L"Spell List"))
GameTooltip_AddInstructionLine(tooltip, string.format("Shift-RightClick - %s", L"Status List"))
]]
GameTooltip_AddInstructionLine(tooltip, string.format("|cffe0896cMiddleClick - %s|r", L"Hide Icon"))
end
})
Expand Down

0 comments on commit ffeb1f5

Please sign in to comment.