From 0ef327cc6de2d5227c3db87c0e7b0207792545c4 Mon Sep 17 00:00:00 2001 From: Artur Morozov Date: Mon, 4 Mar 2019 18:25:29 +0300 Subject: [PATCH] skin: add HelpFrame --- modules/skin.lua | 17 ------- pfUI.toc | 1 + skins/blizzard/help.lua | 101 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 17 deletions(-) create mode 100644 skins/blizzard/help.lua diff --git a/modules/skin.lua b/modules/skin.lua index 6dde40b5..317f7f21 100644 --- a/modules/skin.lua +++ b/modules/skin.lua @@ -84,23 +84,6 @@ pfUI:RegisterModule("skin", function () if a then this:SetPoint(a, b, c, d, e) end end) - CreateBackdrop(TicketStatusFrame) - TicketStatusFrame:ClearAllPoints() - TicketStatusFrame:SetPoint("TOP", 0, -5) - UpdateMovable(TicketStatusFrame) - function TicketStatusFrame_OnEvent() - if ( event == "PLAYER_ENTERING_WORLD" ) then - GetGMTicket() - else - if ( arg1 ~= 0 ) then - this:Show() - refreshTime = GMTICKET_CHECK_INTERVAL - else - this:Hide() - end - end - end - UI_OPTIONS_FRAME:SetScript("OnShow", function() -- default events UIOptionsFrame_Load(); diff --git a/pfUI.toc b/pfUI.toc index 99c489af..7436bdf0 100644 --- a/pfUI.toc +++ b/pfUI.toc @@ -76,6 +76,7 @@ skins\blizzard\battlefield.lua skins\blizzard\dressup.lua skins\blizzard\game_menu.lua skins\blizzard\guild_registrar.lua +skins\blizzard\help.lua # modules modules\gui.lua diff --git a/skins/blizzard/help.lua b/skins/blizzard/help.lua new file mode 100644 index 00000000..0d71a1aa --- /dev/null +++ b/skins/blizzard/help.lua @@ -0,0 +1,101 @@ +pfUI:RegisterSkin("HelpFrame", function () + local border = tonumber(pfUI_config.appearance.border.default) + local bpad = border > 1 and border - 1 or 1 + + StripTextures(HelpFrame) + CreateBackdrop(HelpFrame, nil, nil, .75) + HelpFrame.backdrop:SetPoint("TOPLEFT", 4, -4) + HelpFrame.backdrop:SetPoint("BOTTOMRIGHT", -44, 12) + HelpFrame:SetHitRectInsets(4,44,4,12) + EnableMovable(HelpFrame) + + SkinCloseButton(HelpFrameCloseButton, HelpFrame.backdrop, -6, -6) + + local title = GetNoNameObject(HelpFrame, "FontString", "ARTWORK", HELP_FRAME_TITLE) + title:ClearAllPoints() + title:SetPoint("TOP", HelpFrame.backdrop, "TOP", 0, -10) + + -- HelpFrameHome + StripTextures(HelpFrameHomeIssues) + SkinButton(HelpFrameHomeIssues) + HelpFrameHomeIssues:SetScript("OnMouseUp", function() end) + HelpFrameHomeIssues:SetScript("OnMouseDown", function() end) + + SkinButton(HelpFrameHomeCancel) + + -- HelpFrameGM + SkinButton(HelpFrameGMCancel) + + SkinButton(HelpFrameGMBack) + HelpFrameGMBack:ClearAllPoints() + HelpFrameGMBack:SetPoint("RIGHT", HelpFrameGMCancel, "LEFT", -2*bpad, 0) + + -- HelpFrameOpenTicket + StripTextures(HelpFrameOpenTicketDivider) + + CreateBackdrop(HelpFrameOpenTicketScrollFrame, nil, nil, .75) + StripTextures(HelpFrameOpenTicketScrollFrame) + SkinScrollbar(HelpFrameOpenTicketScrollFrameScrollBar) + HelpFrameOpenTicketText:SetMaxLetters(5000) + + SkinButton(HelpFrameOpenTicketCancel) + + SkinButton(HelpFrameOpenTicketSubmit) + HelpFrameOpenTicketSubmit:ClearAllPoints() + HelpFrameOpenTicketSubmit:SetPoint("RIGHT", HelpFrameOpenTicketCancel, "LEFT", -2*bpad, 0) + + -- HelpFrameGeneral + StripTextures(HelpFrameGeneralButton) + SkinButton(HelpFrameGeneralButton) + HelpFrameGeneralButton:SetScript("OnMouseUp", function() end) + HelpFrameGeneralButton:SetScript("OnMouseDown", function() end) + + StripTextures(HelpFrameGeneralButton2) + SkinButton(HelpFrameGeneralButton2) + HelpFrameGeneralButton2:SetScript("OnMouseUp", function() end) + HelpFrameGeneralButton2:SetScript("OnMouseDown", function() end) + + SkinButton(HelpFrameGeneralCancel) + + SkinButton(HelpFrameGeneralBack) + HelpFrameGeneralBack:ClearAllPoints() + HelpFrameGeneralBack:SetPoint("RIGHT", HelpFrameGeneralCancel, "LEFT", -2*bpad, 0) + + -- HelpFrameHarassment + StripTextures(HelpFrameHarassmentDivider) + StripTextures(HelpFrameHarassmentDivider2) + + StripTextures(HelpFrameVerbalHarassmentButton) + SkinButton(HelpFrameVerbalHarassmentButton) + HelpFrameVerbalHarassmentButton:SetScript("OnMouseUp", function() end) + HelpFrameVerbalHarassmentButton:SetScript("OnMouseDown", function() end) + + StripTextures(HelpFramePhysicalHarassmentButton) + SkinButton(HelpFramePhysicalHarassmentButton) + HelpFramePhysicalHarassmentButton:SetScript("OnMouseUp", function() end) + HelpFramePhysicalHarassmentButton:SetScript("OnMouseDown", function() end) + + SkinButton(HelpFrameHarassmentCancel) + + SkinButton(HelpFrameHarassmentBack) + HelpFrameHarassmentBack:ClearAllPoints() + HelpFrameHarassmentBack:SetPoint("RIGHT", HelpFrameHarassmentCancel, "LEFT", -2*bpad, 0) + + -- TicketStatusFrame + CreateBackdrop(TicketStatusFrame, nil, true, .75) + TicketStatusFrame:ClearAllPoints() + TicketStatusFrame:SetPoint("TOP", 0, -5) + UpdateMovable(TicketStatusFrame) + function TicketStatusFrame_OnEvent() + if ( event == "PLAYER_ENTERING_WORLD" ) then + GetGMTicket() + else + if ( arg1 ~= 0 ) then + this:Show() + refreshTime = GMTICKET_CHECK_INTERVAL + else + this:Hide() + end + end + end +end)