diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 34950ac..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "Common"] - path = Common - url = https://git.grml.de/rilgamon/Common.git diff --git a/Common b/Common deleted file mode 160000 index a4f1483..0000000 --- a/Common +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a4f1483ece050607772176aed8b46a565df60458 diff --git a/specialframe.lua b/specialframe.lua deleted file mode 100644 index cff3f41..0000000 --- a/specialframe.lua +++ /dev/null @@ -1,113 +0,0 @@ -local addon, tab = ... -local _G = _G - -local function uniqueName(name) - local unique,n = name.."1" ,1 - while(_G[unique]) do - n = n + 1 - unique = format("%s%s",name,n) - end - return unique -end - -local function onclick(self) - PanelTemplates_SetTab(self:GetParent(), self:GetID()); -end - -local function createSpecialFrame(name, store, tabin) - name = name or addon - tabin = tabin or {} - tabin['tex1'] = tabin['tex1'] or "Interface/TaxiFrame/UI-TaxiFrame-TopLeft.blp" -- 256x256 - tabin['tex1w'] = tabin['tex1w'] or 256 - tabin['tex1h'] = tabin['tex1h'] or 256 - tabin['tex2'] = tabin['tex2'] or "Interface/TaxiFrame/UI-TaxiFrame-TopRight" -- 128x256 - tabin['tex2w'] = tabin['tex2w'] or 128 - tabin['tex2h'] = tabin['tex2h'] or 256 - tabin['tex3'] = tabin['tex3'] or "Interface/TaxiFrame/UI-TaxiFrame-BotLeft" -- 256x256 - tabin['tex3w'] = tabin['tex3w'] or 256 - tabin['tex3h'] = tabin['tex3h'] or 256 - tabin['tex4'] = tabin['tex4'] or "Interface/TaxiFrame/UI-TaxiFrame-BotRight" -- 128x256 - tabin['tex4w'] = tabin['tex4w'] or 128 - tabin['tex4h'] = tabin['tex4h'] or 256 - tabin['tex5'] = tabin['tex5'] or "Interface/MERCHANTFRAME/UI-BuyBack-Icon" -- 64x64 - tabin['tex5w'] = tabin['tex5w'] or 64 - tabin['tex5h'] = tabin['tex5h'] or 64 - tabin['title'] = tabin['title'] or addon - tabin['strata'] = tabin['strata'] or "MEDIUM" - local frame = CreateFrame("Frame",uniqueName(name),UIParent) - frame:SetWidth(348) - frame:SetHeight(512) - frame:SetPoint("CENTER",UIParent,"CENTER",0,0) - frame['tab'] = store --- tab['loadFrame'](frame) - tab['AddDrag'](frame) - frame['title'] = frame:CreateFontString("$PARENTTitle","OVERLAY","GameFontNormal") - frame['title']:SetPoint("TOP",frame,"TOP",0,-17) - frame['title']:SetText(tabin['title']) - frame['tex1'] = frame:CreateTexture(tabin['tex1'],tabin['strata']) - frame['tex1f'] = CreateFrame("Frame","$PARENTt1",frame) - frame['tex1f']:SetWidth(tabin['tex1w']) - frame['tex1f']:SetFrameLevel(5) - frame['tex1f']:SetHeight(tabin['tex1w']) - frame['tex1']:SetAllPoints(frame['tex1f']) - frame['tex1']:SetTexture(tabin['tex1']) - frame['tex2'] = frame:CreateTexture(tabin['tex2'],tabin['strata']) - frame['tex2f'] = CreateFrame("Frame","$PARENTt2",frame) - frame['tex2f']:SetWidth(tabin['tex2w']) - frame['tex2f']:SetHeight(tabin['tex2h']) - frame['tex2']:SetAllPoints(frame['tex2f']) - frame['tex2']:SetTexture(tabin['tex2']) - frame['tex3'] = frame:CreateTexture(tabin['tex3'],tabin['strata']) - frame['tex3f'] = CreateFrame("Frame","$PARENTt3",frame) - frame['tex3f']:SetWidth(tabin['tex3w']) - frame['tex3f']:SetHeight(tabin['tex3h']) - frame['tex3']:SetAllPoints(frame['tex3f']) - frame['tex3']:SetTexture(tabin['tex3']) - frame['tex4'] = frame:CreateTexture(tabin['tex4'],tabin['strata']) - frame['tex4f'] = CreateFrame("Frame","$PARENTt4",frame) - frame['tex4f']:SetWidth(tabin['tex4w']) - frame['tex4f']:SetHeight(tabin['tex4h']) - frame['tex4']:SetAllPoints(frame['tex4f']) - frame['tex4']:SetTexture(tabin['tex4']) - frame['tex5'] = frame:CreateTexture(tabin['tex5'],"BACKGROUND") - frame['tex5f'] = CreateFrame("Frame","$PARENTt5",frame) - frame['tex5f']:SetWidth(tabin['tex5w']) - frame['tex5f']:SetHeight(tabin['tex5h']) - frame['tex5']:SetAllPoints(frame['tex5f']) - frame['tex5']:SetTexture(tabin['tex5']) - frame['tex5f']:SetFrameLevel(6) - frame['tex1f']:SetPoint("TOPLEFT",frame,"TOPLEFT") - frame['tex5f']:SetPoint("TOPLEFT",frame,"TOPLEFT",8,-5) - frame['tex2f']:SetPoint("TOPRIGHT",frame,"TOPRIGHT") - frame['tex3f']:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT") - frame['tex4f']:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT") - frame['closebutton'] = CreateFrame("Button","$PARENTCloseButton",frame,"UIPanelCloseButton") - frame['closebutton']:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-30,-8) - frame['numTabs'] = tabin['numTabs'] or 0 - local prev = frame - local anchor = "CENTER" - local parentanchor = "BOTTOMLEFT" - local x,y = 60,62 - local framenum - if(frame['numTabs'] and frame['numTabs'] > 0) then - for k = 1, frame['numTabs'] do - framenum = format("frametab%d",k) - frame[framenum] = CreateFrame("Button",format("$PARENTTab%d",k),frame,"CharacterFrameTabButtonTemplate") - frame[framenum]:SetPoint(anchor,prev,parentanchor,x,y) - frame[framenum]:SetFrameStrata("HIGH") - frame[framenum]:SetText(tabin['tabtxt'..k] or "none") - frame[framenum]:SetID(k) - frame[framenum]:SetScript("OnClick", onclick) - x = -16 - y = 0 - anchor = "LEFT" - parentanchor = "RIGHT" - prev = frame[framenum] - end - end - PanelTemplates_SetTab(frame, 1); - frame:Hide() - return frame -end - -tab['createSpecialFrame'] = createSpecialFrame \ No newline at end of file