diff --git a/CommunityDKP.lua b/CommunityDKP.lua index 3e505fc8..6ef09498 100644 --- a/CommunityDKP.lua +++ b/CommunityDKP.lua @@ -238,7 +238,13 @@ function CommDKP:SortDKPTable(id, reset) -- reorganizes core.WorkingTable end function CommDKP:CreateMenu() - CommDKP.UIConfig = CreateFrame("Frame", "CommDKPConfig", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) --UIPanelDialogueTemplate, ShadowOverlaySmallTemplate + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig = CreateFrame("Frame", "CommDKPConfig", UIParent, "ShadowOverlaySmallTemplate") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig = CreateFrame("Frame", "CommDKPConfig", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) --UIPanelDialogueTemplate, ShadowOverlaySmallTemplate + end + CommDKP.UIConfig:SetPoint("CENTER", UIParent, "CENTER", -250, 100); CommDKP.UIConfig:SetSize(550, 590); CommDKP.UIConfig:SetBackdrop({ @@ -248,9 +254,6 @@ function CommDKP:CreateMenu() CommDKP.UIConfig:SetBackdropColor(0,0,0,0.8); CommDKP.UIConfig:SetMovable(true); CommDKP.UIConfig:EnableMouse(true); - --CommDKP.UIConfig:SetResizable(true); - --CommDKP.UIConfig:SetMaxResize(1400, 875) - --CommDKP.UIConfig:SetMinResize(1000, 590) CommDKP.UIConfig:RegisterForDrag("LeftButton"); CommDKP.UIConfig:SetScript("OnDragStart", CommDKP.UIConfig.StartMoving); CommDKP.UIConfig:SetScript("OnDragStop", CommDKP.UIConfig.StopMovingOrSizing); @@ -262,18 +265,34 @@ function CommDKP:CreateMenu() if core.BiddingWindow then core.BiddingWindow:SetFrameLevel(2) end end) -- Close Button - CommDKP.UIConfig.closeContainer = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.closeContainer = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.closeContainer = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.UIConfig.closeContainer:SetPoint("CENTER", CommDKP.UIConfig, "TOPRIGHT", -4, 0) - Mixin(CommDKP.UIConfig.closeContainer, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.UIConfig.closeContainer, BackdropTemplateMixin) + end + CommDKP.UIConfig.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 3, }); + CommDKP.UIConfig.closeContainer:SetBackdropColor(0,0,0,0.9) CommDKP.UIConfig.closeContainer:SetBackdropBorderColor(1,1,1,0.2) CommDKP.UIConfig.closeContainer:SetSize(28, 28) - CommDKP.UIConfig.closeBtn = CreateFrame("Button", nil, CommDKP.UIConfig, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.closeBtn = CreateFrame("Button", nil, CommDKP.UIConfig, "UIPanelCloseButton") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.closeBtn = CreateFrame("Button", nil, CommDKP.UIConfig, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.UIConfig.closeBtn:SetPoint("CENTER", CommDKP.UIConfig.closeContainer, "TOPRIGHT", -14, -14) tinsert(UISpecialFrames, CommDKP.UIConfig:GetName()); -- Sets frame to close on "Escape" --------------------------------------- @@ -285,10 +304,20 @@ function CommDKP:CreateMenu() --------------------------------------- -- DKP Table Header and Sort Buttons --------------------------------------- - CommDKP.DKPTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.DKPTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", CommDKP.UIConfig) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.DKPTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.DKPTable_Headers:SetSize(500, 22) CommDKP.DKPTable_Headers:SetPoint("BOTTOMLEFT", CommDKP.DKPTable, "TOPLEFT", 0, 1) - Mixin(CommDKP.DKPTable_Headers, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.DKPTable_Headers, BackdropTemplateMixin) + end + CommDKP.DKPTable_Headers:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, @@ -299,9 +328,17 @@ function CommDKP:CreateMenu() --------------------------------------- -- Sort Buttons --------------------------------------- - SortButtons.player = CreateFrame("Button", "$ParentSortButtonPlayer", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) - SortButtons.class = CreateFrame("Button", "$ParentSortButtonClass", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) - SortButtons.dkp = CreateFrame("Button", "$ParentSortButtonDkp", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + SortButtons.player = CreateFrame("Button", "$ParentSortButtonPlayer", CommDKP.DKPTable_Headers) + SortButtons.class = CreateFrame("Button", "$ParentSortButtonClass", CommDKP.DKPTable_Headers) + SortButtons.dkp = CreateFrame("Button", "$ParentSortButtonDkp", CommDKP.DKPTable_Headers) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + SortButtons.player = CreateFrame("Button", "$ParentSortButtonPlayer", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + SortButtons.class = CreateFrame("Button", "$ParentSortButtonClass", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + SortButtons.dkp = CreateFrame("Button", "$ParentSortButtonDkp", CommDKP.DKPTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + SortButtons.class:SetPoint("BOTTOM", CommDKP.DKPTable_Headers, "BOTTOM", 0, 2) SortButtons.player:SetPoint("RIGHT", SortButtons.class, "LEFT") SortButtons.dkp:SetPoint("LEFT", SortButtons.class, "RIGHT") @@ -396,7 +433,13 @@ function CommDKP:CreateMenu() ------------------------------ -- Search Box ------------------------------ - CommDKP.UIConfig.search = CreateFrame("EditBox", nil, CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.search = CreateFrame("EditBox", nil, CommDKP.UIConfig) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.search = CreateFrame("EditBox", nil, CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.UIConfig.search:SetPoint("BOTTOMLEFT", CommDKP.UIConfig, "BOTTOMLEFT", 50, 18) CommDKP.UIConfig.search:SetAutoFocus(false) CommDKP.UIConfig.search:SetMultiLine(false) @@ -536,7 +579,13 @@ function CommDKP:CreateMenu() --------------------------------------- -- Expand / Collapse Arrow --------------------------------------- - CommDKP.UIConfig.expand = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.expand = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.expand = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.UIConfig.expand:SetPoint("LEFT", CommDKP.UIConfig, "RIGHT", 0, 0) CommDKP.UIConfig.expand:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -568,7 +617,13 @@ function CommDKP:CreateMenu() end) -- Title Frame (top/center) - CommDKP.UIConfig.TitleBar = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.TitleBar = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, "ShadowOverlaySmallTemplate") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.TitleBar = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.UIConfig.TitleBar:SetPoint("BOTTOM", SortButtons.class, "TOP", 0, 10) CommDKP.UIConfig.TitleBar:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -587,7 +642,12 @@ function CommDKP:CreateMenu() -- CHANGE LOG WINDOW --------------------------------------- if core.DB.defaults.HideChangeLogs < core.BuildNumber then - CommDKP.ChangeLogDisplay = CreateFrame("Frame", "CommDKP_ChangeLogDisplay", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ChangeLogDisplay = CreateFrame("Frame", "CommDKP_ChangeLogDisplay", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ChangeLogDisplay = CreateFrame("Frame", "CommDKP_ChangeLogDisplay", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end CommDKP.ChangeLogDisplay:SetPoint("TOP", UIParent, "TOP", 0, -200); CommDKP.ChangeLogDisplay:SetSize(600, 100); @@ -632,7 +692,13 @@ function CommDKP:CreateMenu() CommDKP.ChangeLogDisplay.ChangeLogText:SetPoint("TOPLEFT", CommDKP.ChangeLogDisplay.VerNumber, "BOTTOMLEFT", 5, -0); -- Change Log Close Button - CommDKP.ChangeLogDisplay.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.ChangeLogDisplay, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ChangeLogDisplay.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.ChangeLogDisplay) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ChangeLogDisplay.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.ChangeLogDisplay, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ChangeLogDisplay.closeContainer:SetPoint("CENTER", CommDKP.ChangeLogDisplay, "TOPRIGHT", -4, 0) CommDKP.ChangeLogDisplay.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, diff --git a/ConfigMenuTabs.lua b/ConfigMenuTabs.lua index 7776ecf0..691587eb 100644 --- a/ConfigMenuTabs.lua +++ b/ConfigMenuTabs.lua @@ -122,7 +122,13 @@ function CommDKP:ConfigMenuTabs() --------------------------------------- -- TabMenu --------------------------------------- - CommDKP.UIConfig.TabMenu = CreateFrame("Frame", "CommDKPCommDKP.ConfigTabMenu", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.UIConfig.TabMenu = CreateFrame("Frame", "CommDKPCommDKP.ConfigTabMenu", CommDKP.UIConfig); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.UIConfig.TabMenu = CreateFrame("Frame", "CommDKPCommDKP.ConfigTabMenu", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + CommDKP.UIConfig.TabMenu:SetPoint("TOPRIGHT", CommDKP.UIConfig, "TOPRIGHT", -25, -25); --Moves the entire tabframe (defaults -25, -25) CommDKP.UIConfig.TabMenu:SetSize(535, 510); --default: 477,510 CommDKP.UIConfig.TabMenu:SetBackdrop( { @@ -146,12 +152,14 @@ function CommDKP:ConfigMenuTabs() CommDKP.UIConfig.TabMenu.ScrollFrame:SetClipsChildren(false); CommDKP.UIConfig.TabMenu.ScrollFrame:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + -- CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar = CreateFrame("Slider", nil, CommDKP.UIConfig.TabMenu.ScrollFrame, "UIPanelScrollFrameTemplate") + -- CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:Hide(); + -- CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:ClearAllPoints(); + -- CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:SetPoint("TOPLEFT", CommDKP.UIConfig.TabMenu.ScrollFrame, "TOPRIGHT", -20, -12); + -- CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:SetPoint("BOTTOMRIGHT", CommDKP.UIConfig.TabMenu.ScrollFrame, "BOTTOMRIGHT", -2, 15); + end - --CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar = CreateFrame("Slider", nil, CommDKP.UIConfig.TabMenu.ScrollFrame, "UIPanelScrollFrameTemplate") - --CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:Hide(); - --CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:ClearAllPoints(); - --CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:SetPoint("TOPLEFT", CommDKP.UIConfig.TabMenu.ScrollFrame, "TOPRIGHT", -20, -12); - --CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:SetPoint("BOTTOMRIGHT", CommDKP.UIConfig.TabMenu.ScrollFrame, "BOTTOMRIGHT", -2, 15); CommDKP.ConfigTab1, CommDKP.ConfigTab2, CommDKP.ConfigTab3, CommDKP.ConfigTab4, CommDKP.ConfigTab5, CommDKP.ConfigTab6, CommDKP.ConfigTab7 = CommDKP:SetTabs(CommDKP.UIConfig.TabMenu, 7, 533, 490, L["FILTERS"], L["ADJUSTDKP"], L["MANAGE"], L["OPTIONS"], L["LOOTHISTORY"], L["DKPHISTORY"], L["PRICETAB"]); diff --git a/Core.lua b/Core.lua index e7b07aba..cf3e7b5f 100644 --- a/Core.lua +++ b/Core.lua @@ -167,9 +167,9 @@ core.EncounterList = { -- Event IDs must be in the exact same order as core } core.CommDKPUI = {} -- global storing entire Configuration UI to hide/show UI -core.MonVersion = "v3.2.7"; -core.BuildNumber = 30207; -core.ReleaseNumber = 67 +core.MonVersion = "v3.2.8"; +core.BuildNumber = 30208; +core.ReleaseNumber = 68 core.defaultTable = "__default"; core.SemVer = core.MonVersion.."-r"..tostring(core.ReleaseNumber); core.UpgradeSchema = false; @@ -505,7 +505,14 @@ function CommDKP:BroadcastTimer(seconds, ...) -- broadcasts timer and star end function CommDKP:CreateContainer(parent, name, header) - local f = CreateFrame("Frame", "CommDKP"..name, parent, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP"..name, parent); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + local f = CreateFrame("Frame", "CommDKP"..name, parent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + + f:SetBackdrop( { edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, insets = { left = 0, right = 0, top = 0, bottom = 0 } @@ -513,7 +520,12 @@ function CommDKP:CreateContainer(parent, name, header) f:SetBackdropColor(0,0,0,0.9); f:SetBackdropBorderColor(1,1,1,0.5) - f.header = CreateFrame("Frame", "CommDKP"..name.."Header", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.header = CreateFrame("Frame", "CommDKP"..name.."Header", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.header = CreateFrame("Frame", "CommDKP"..name.."Header", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.header:SetBackdrop( { bgFile = "Textures\\white.blp", tile = true, -- White backdrop allows for black background with 1.0 alpha on low alpha containers insets = { left = 0, right = 0, top = 0, bottom = 0 } diff --git a/Localization/Localization.cn.lua b/Localization/Localization.cn.lua index c58a0c2b..6b509f58 100644 --- a/Localization/Localization.cn.lua +++ b/Localization/Localization.cn.lua @@ -900,13 +900,14 @@ if GetLocale() == "zhCN" then MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE: --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.de.lua b/Localization/Localization.de.lua index 4b011aee..81c677dc 100644 --- a/Localization/Localization.de.lua +++ b/Localization/Localization.de.lua @@ -894,13 +894,14 @@ if GetLocale() == "deDE" then MIGRATIONCOMPLETED = "Migration abgeschlossen.|n|nBitte deaktivieren Sie MonolithDKP und laden Sie das UI neu. (/reload)", --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.en.lua b/Localization/Localization.en.lua index fa5a06db..8e58fb8d 100644 --- a/Localization/Localization.en.lua +++ b/Localization/Localization.en.lua @@ -875,13 +875,13 @@ core.L = { MIGRATIONCANCELED = "Migration canceled.|n|nPlease disable MonolithDKP and /reload the UI if you want to continue with CommunityDKP without using your current tables and settings.", MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.es.lua b/Localization/Localization.es.lua index ec134feb..f823a653 100644 --- a/Localization/Localization.es.lua +++ b/Localization/Localization.es.lua @@ -898,13 +898,14 @@ if GetLocale() == "esES" or GetLocale() == "esMX" then MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE: --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.fr.lua b/Localization/Localization.fr.lua index f3144594..8d45ff38 100644 --- a/Localization/Localization.fr.lua +++ b/Localization/Localization.fr.lua @@ -945,13 +945,14 @@ if GetLocale() == "frFR" then MIGRATIONCOMPLETED = "Migration réussie.|n|nVeuillez désactiver MonolithDKP et recharger votre interface (/reload).", --TODO TRANSLATE: --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.kr.lua b/Localization/Localization.kr.lua index 93a3ed81..bdb2e895 100644 --- a/Localization/Localization.kr.lua +++ b/Localization/Localization.kr.lua @@ -897,13 +897,14 @@ if GetLocale() == "koKR" then MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE: --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.ru.lua b/Localization/Localization.ru.lua index 83cb06ce..2aacdef1 100644 --- a/Localization/Localization.ru.lua +++ b/Localization/Localization.ru.lua @@ -956,13 +956,14 @@ if GetLocale() == "ruRU" then MIGRATIONCOMPLETED = "Миграция завершена.|n|nПожалуйста отключите MonolithDKP и перезагрузите интерфейс.", --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Localization/Localization.se.lua b/Localization/Localization.se.lua index d1c0b293..4c13f6a7 100644 --- a/Localization/Localization.se.lua +++ b/Localization/Localization.se.lua @@ -808,7 +808,7 @@ core.L = { MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", CHANGELOG2 = " - fixed class filters (shamans / paladins)", CHANGELOG3 = " - fixed class graph (9th class)", CHANGELOG4 = " - updated version in the header", diff --git a/Localization/Localization.tw.lua b/Localization/Localization.tw.lua index 0b6987e1..a8c60760 100644 --- a/Localization/Localization.tw.lua +++ b/Localization/Localization.tw.lua @@ -899,13 +899,14 @@ if GetLocale() == "zhTW" then MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE: --TODO TRANSLATE: - CHANGELOG1 = "CommunityDKP - v3.2.7-r67-bcc", - CHANGELOG2 = " - fixed class filters (shamans / paladins)", - CHANGELOG3 = " - fixed class graph (9th class)", - CHANGELOG4 = " - updated version in the header", - CHANGELOG5 = " - added TBC zones and encounters", - CHANGELOG6 = " - added localizations to TBC zones and encounters", - CHANGELOG7 = " - added auto award loot PR#174", + CHANGELOG1 = "CommunityDKP - v3.2.8-r68-bcc", + CHANGELOG2 = " - fixed UI for classic era realms", + CHANGELOG3 = "", + CHANGELOG4 = "", + CHANGELOG5 = "", + CHANGELOG6 = "", + CHANGELOG7 = "", + CHANGELOG8 = "", CHANGELOG8 = "", CHANGELOG9 = "Taidtuskecyh @ Gehennas", CHANGELOG10 = "CommunityDKP Discord: https://discord.gg/dXXK4vH" diff --git a/Modules/AdjustDKP.lua b/Modules/AdjustDKP.lua index 7cfaf360..d52d217e 100644 --- a/Modules/AdjustDKP.lua +++ b/Modules/AdjustDKP.lua @@ -135,8 +135,13 @@ end local function RaidTimerPopout_Create() if not CommDKP.RaidTimerPopout then - CommDKP.RaidTimerPopout = CreateFrame("Frame", "CommDKP_RaidTimerPopout", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.RaidTimerPopout = CreateFrame("Frame", "CommDKP_RaidTimerPopout", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.RaidTimerPopout = CreateFrame("Frame", "CommDKP_RaidTimerPopout", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + CommDKP.RaidTimerPopout:SetPoint("RIGHT", UIParent, "RIGHT", -300, 100); CommDKP.RaidTimerPopout:SetSize(100, 50); CommDKP.RaidTimerPopout:SetBackdrop( { @@ -155,7 +160,12 @@ local function RaidTimerPopout_Create() CommDKP.RaidTimerPopout:SetScript("OnDragStop", CommDKP.RaidTimerPopout.StopMovingOrSizing); -- Popout Close Button - CommDKP.RaidTimerPopout.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.RaidTimerPopout, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.RaidTimerPopout.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.RaidTimerPopout) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.RaidTimerPopout.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.RaidTimerPopout, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.RaidTimerPopout.closeContainer:SetPoint("CENTER", CommDKP.RaidTimerPopout, "TOPRIGHT", -8, -4) CommDKP.RaidTimerPopout.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -274,7 +284,13 @@ function CommDKP:AdjustDKPTab_Create() CommDKP.ConfigTab2.reasonHeader:SetText(L["REASONFORADJUSTMENT"]..":") -- Other Reason Editbox. Hidden unless "Other" is selected in dropdown - CommDKP.ConfigTab2.otherReason = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.otherReason = CreateFrame("EditBox", nil, CommDKP.ConfigTab2) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.otherReason = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab2.otherReason:SetPoint("TOPLEFT", CommDKP.ConfigTab2.reasonDropDown, "BOTTOMLEFT", 19, 2) CommDKP.ConfigTab2.otherReason:SetAutoFocus(false) CommDKP.ConfigTab2.otherReason:SetMultiLine(false) @@ -414,7 +430,13 @@ function CommDKP:AdjustDKPTab_Create() end -- Add DKP Edit Box - CommDKP.ConfigTab2.addDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.addDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.addDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab2.addDKP:SetPoint("TOPLEFT", CommDKP.ConfigTab2.reasonDropDown, "BOTTOMLEFT", 20, -44) CommDKP.ConfigTab2.addDKP:SetAutoFocus(false) CommDKP.ConfigTab2.addDKP:SetMultiLine(false) @@ -522,7 +544,13 @@ function CommDKP:AdjustDKPTab_Create() end) -- weekly decay Editbox - CommDKP.ConfigTab2.decayDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.decayDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.decayDKP = CreateFrame("EditBox", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab2.decayDKP:SetPoint("BOTTOMLEFT", CommDKP.ConfigTab2, "BOTTOMLEFT", 21, 70) CommDKP.ConfigTab2.decayDKP:SetAutoFocus(false) CommDKP.ConfigTab2.decayDKP:SetMultiLine(false) @@ -644,7 +672,13 @@ function CommDKP:AdjustDKPTab_Create() end) -- Raid Timer Container - CommDKP.ConfigTab2.RaidTimerContainer = CreateFrame("Frame", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer = CreateFrame("Frame", nil, CommDKP.ConfigTab2); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer = CreateFrame("Frame", nil, CommDKP.ConfigTab2, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + CommDKP.ConfigTab2.RaidTimerContainer:SetSize(200, 360); CommDKP.ConfigTab2.RaidTimerContainer:SetPoint("RIGHT", CommDKP.ConfigTab2, "RIGHT", -25, -60) CommDKP.ConfigTab2.RaidTimerContainer:SetBackdrop({ @@ -835,7 +869,13 @@ function CommDKP:AdjustDKPTab_Create() -- Award Interval Editbox if not core.DB.modes.increment then core.DB.modes.increment = 60 end - CommDKP.ConfigTab2.RaidTimerContainer.interval = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer.interval = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer.interval = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab2.RaidTimerContainer.interval:SetPoint("BOTTOMLEFT", CommDKP.ConfigTab2.RaidTimerContainer, "BOTTOMLEFT", 35, 225) CommDKP.ConfigTab2.RaidTimerContainer.interval:SetAutoFocus(false) CommDKP.ConfigTab2.RaidTimerContainer.interval:SetMultiLine(false) @@ -898,7 +938,13 @@ function CommDKP:AdjustDKPTab_Create() -- Award Value Editbox if not core.DB.DKPBonus.IntervalBonus then core.DB.DKPBonus.IntervalBonus = 15 end - CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue = CreateFrame("EditBox", nil, CommDKP.ConfigTab2.RaidTimerContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue:SetPoint("LEFT", CommDKP.ConfigTab2.RaidTimerContainer.interval, "RIGHT", 10, 0) CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue:SetAutoFocus(false) CommDKP.ConfigTab2.RaidTimerContainer.bonusvalue:SetMultiLine(false) diff --git a/Modules/Award.lua b/Modules/Award.lua index 8d611414..6388c087 100644 --- a/Modules/Award.lua +++ b/Modules/Award.lua @@ -274,7 +274,12 @@ local function AwardItem(player, cost, boss, zone, loot, reassign) end local function AwardConfirm_Create() - local f = CreateFrame("Frame", "CommDKP_AwardWindowConfirm", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_AwardWindowConfirm", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_AwardWindowConfirm", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end f:SetPoint("TOP", UIParent, "TOP", 0, -200); f:SetSize(400, 270); -- + 40 @@ -356,7 +361,12 @@ local function AwardConfirm_Create() f.costHeader:SetPoint("TOPRIGHT", f.lootHeader, "BOTTOMRIGHT", 0, -10); f.costHeader:SetText(L["ITEMCOST"]..":") - f.cost = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.cost = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.cost = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.cost:SetAutoFocus(false) f.cost:SetMultiLine(false) f.cost:SetPoint("LEFT", f.costHeader, "RIGHT", 5, 0) diff --git a/Modules/BidInterface.lua b/Modules/BidInterface.lua index 598a29f0..de4225df 100644 --- a/Modules/BidInterface.lua +++ b/Modules/BidInterface.lua @@ -324,23 +324,29 @@ function CommDKP:BidInterface_Toggle() end local function BidWindowCreateRow(parent, id) -- Create 3 buttons for each row in the list + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_BidderWindow", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then local f = CreateFrame("Button", "$parentLine"..id, parent) - f.Strings = {} - f:SetSize(width, height) - f:SetHighlightTexture("Interface\\AddOns\\CommunityDKP\\Media\\Textures\\ListBox-Highlight"); - f:SetNormalTexture("Interface\\COMMON\\talent-blue-glow") - f:GetNormalTexture():SetAlpha(0.2) - for i=1, 3 do - f.Strings[i] = f:CreateFontString(nil, "OVERLAY"); - f.Strings[i]:SetTextColor(1, 1, 1, 1); - if i==1 then - f.Strings[i]:SetFontObject("CommDKPNormalLeft"); - else - f.Strings[i]:SetFontObject("CommDKPNormalCenter"); - end - end + end + + f.Strings = {} + f:SetSize(width, height) + f:SetHighlightTexture("Interface\\AddOns\\CommunityDKP\\Media\\Textures\\ListBox-Highlight"); + f:SetNormalTexture("Interface\\COMMON\\talent-blue-glow") + f:GetNormalTexture():SetAlpha(0.2) + for i=1, 3 do + f.Strings[i] = f:CreateFontString(nil, "OVERLAY"); + f.Strings[i]:SetTextColor(1, 1, 1, 1); + if i==1 then + f.Strings[i]:SetFontObject("CommDKPNormalLeft"); + else + f.Strings[i]:SetFontObject("CommDKPNormalCenter"); + end + end - f.Strings[1].rowCounter = f:CreateFontString(nil, "OVERLAY"); + f.Strings[1].rowCounter = f:CreateFontString(nil, "OVERLAY"); f.Strings[1].rowCounter:SetFontObject("CommDKPSmallOutlineLeft") f.Strings[1].rowCounter:SetTextColor(1, 1, 1, 0.3); f.Strings[1].rowCounter:SetPoint("LEFT", f, "LEFT", 3, -1); @@ -525,7 +531,13 @@ function CommDKP:BidInterface_Create() tinsert(UISpecialFrames, f:GetName()); -- Sets frame to close on "Escape" -- Close Button - f.closeContainer = CreateFrame("Frame", "CommDKPBidderWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPBidderWindowCloseButtonContainer", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPBidderWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeContainer:SetPoint("CENTER", f, "TOPRIGHT", -4, 0) f.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -535,13 +547,24 @@ function CommDKP:BidInterface_Create() f.closeContainer:SetBackdropBorderColor(1,1,1,0.2) f.closeContainer:SetSize(28, 28) - f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeBtn:SetPoint("CENTER", f.closeContainer, "TOPRIGHT", -14, -14) f.LootTableIcons = {} f.LootTableButtons = {} - f.lootContainer = CreateFrame("Frame", "CommDKP_LootContainer", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.lootContainer = CreateFrame("Frame", "CommDKP_LootContainer", UIParent); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.lootContainer = CreateFrame("Frame", "CommDKP_LootContainer", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + + f.lootContainer:SetPoint("TOP", f, "TOP", 0, -40); f.lootContainer:SetSize(35, 35) @@ -794,12 +817,15 @@ function CommDKP:BidInterface_Create() f.bidTable = CreateFrame("ScrollFrame", "CommDKP_BiderWindowTable", f, "FauxScrollFrameTemplate") f.bidTable:SetSize(width, height*numrows+3) - -- f.bidTable:SetBackdrop({ - -- bgFile = "Textures\\white.blp", tile = true, - -- edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, - -- }); - -- f.bidTable:SetBackdropColor(0,0,0,0.2) - -- f.bidTable:SetBackdropBorderColor(1,1,1,0.4) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.bidTable:SetBackdrop({ + bgFile = "Textures\\white.blp", tile = true, + edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, + }); + f.bidTable:SetBackdropColor(0,0,0,0.2) + f.bidTable:SetBackdropBorderColor(1,1,1,0.4) + end + f.bidTable.ScrollBar = FauxScrollFrame_GetChildFrames(f.bidTable) f.bidTable.ScrollBar:Hide() f.bidTable.Rows = {} @@ -821,7 +847,12 @@ function CommDKP:BidInterface_Create() f.headerButtons = {} mode = core.DB.modes.mode; - f.BidTable_Headers = CreateFrame("Frame", "CommDKPBidderTableHeaders", f.bidTable, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.BidTable_Headers = CreateFrame("Frame", "CommDKPBidderTableHeaders", f.bidTable) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.BidTable_Headers = CreateFrame("Frame", "CommDKPBidderTableHeaders", f.bidTable, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.BidTable_Headers:SetSize(370, 22) f.BidTable_Headers:SetPoint("BOTTOMLEFT", f.bidTable, "TOPLEFT", 0, 1) f.BidTable_Headers:SetBackdrop({ @@ -833,9 +864,15 @@ function CommDKP:BidInterface_Create() f.bidTable:SetPoint("BOTTOM", f, "BOTTOM", 0, 15) f.BidTable_Headers:Show() - f.headerButtons.player = CreateFrame("Button", "$ParentButtonPlayer", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) - f.headerButtons.bid = CreateFrame("Button", "$ParentButtonBid", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) - f.headerButtons.dkp = CreateFrame("Button", "$ParentSuttonDkp", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.headerButtons.player = CreateFrame("Button", "$ParentButtonPlayer", f.BidTable_Headers) + f.headerButtons.bid = CreateFrame("Button", "$ParentButtonBid", f.BidTable_Headers) + f.headerButtons.dkp = CreateFrame("Button", "$ParentSuttonDkp", f.BidTable_Headers) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.headerButtons.player = CreateFrame("Button", "$ParentButtonPlayer", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + f.headerButtons.bid = CreateFrame("Button", "$ParentButtonBid", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + f.headerButtons.dkp = CreateFrame("Button", "$ParentSuttonDkp", f.BidTable_Headers, BackdropTemplateMixin and "BackdropTemplate" or nil) + end f.headerButtons.player:SetPoint("LEFT", f.BidTable_Headers, "LEFT", 2, 0) f.headerButtons.bid:SetPoint("LEFT", f.headerButtons.player, "RIGHT", 0, 0) diff --git a/Modules/Bidding.lua b/Modules/Bidding.lua index afc9ee70..1d43cb8e 100644 --- a/Modules/Bidding.lua +++ b/Modules/Bidding.lua @@ -936,7 +936,14 @@ end function CommDKP:CreateTimer() - local f = CreateFrame("StatusBar", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) + local f; + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f = CreateFrame("StatusBar", nil, UIParent) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f = CreateFrame("StatusBar", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f:SetSize(300, 25) f:SetFrameStrata("DIALOG") f:SetFrameLevel(18) @@ -963,7 +970,12 @@ function CommDKP:CreateTimer() core.DB.timerpos["y"] = yOff; end); - f.border = CreateFrame("Frame", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.border = CreateFrame("Frame", nil, f); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.border = CreateFrame("Frame", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + f.border:SetPoint("CENTER", f, "CENTER"); f.border:SetFrameStrata("DIALOG") f.border:SetFrameLevel(19) @@ -1193,7 +1205,13 @@ function CommDKP:BidScrollFrame_Update() end function CommDKP:CreateBidWindow() - local f = CreateFrame("Frame", "CommDKP_BiddingWindow", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_BiddingWindow", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_BiddingWindow", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + mode = core.DB.modes.mode; f:SetPoint("TOPLEFT", UIParent, "TOPLEFT", 300, -200); @@ -1237,7 +1255,13 @@ function CommDKP:CreateBidWindow() tinsert(UISpecialFrames, f:GetName()); -- Sets frame to close on "Escape" -- Close Button - f.closeContainer = CreateFrame("Frame", "CommDKPBiddingWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPBiddingWindowCloseButtonContainer", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPBiddingWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeContainer:SetPoint("CENTER", f, "TOPRIGHT", -4, 0) f.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -1257,7 +1281,13 @@ function CommDKP:CreateBidWindow() f.bossHeader:SetPoint("TOPLEFT", f, "TOPLEFT", 85, -25); f.bossHeader:SetText(L["BOSS"]..":") - f.boss = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.boss = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.boss = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + + f.boss:SetFontObject("CommDKPNormalLeft"); f.boss:SetAutoFocus(false) f.boss:SetMultiLine(false) @@ -1319,7 +1349,12 @@ function CommDKP:CreateBidWindow() -- Min Bid f.minBidHeader:SetText(L["MINIMUMBID"]..": ") - f.minBid = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.minBid = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.minBid = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.minBid:SetPoint("LEFT", f.minBidHeader, "RIGHT", 8, 0) f.minBid:SetAutoFocus(false) f.minBid:SetMultiLine(false) @@ -1380,7 +1415,12 @@ function CommDKP:CreateBidWindow() f.maxBidHeader:SetPoint("TOP", f.minBidHeader, "BOTTOM", -2, -25); f.maxBidHeader:SetText(L["MAXIMUMBID"]..": ") - f.maxBid = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.maxBid = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.maxBid = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.maxBid:SetPoint("LEFT", f.maxBidHeader, "RIGHT", 8, 0) f.maxBid:SetAutoFocus(false) f.maxBid:SetMultiLine(false) @@ -1443,7 +1483,12 @@ function CommDKP:CreateBidWindow() end f.bidTimerHeader:SetText(L["BIDTIMER"]..": ") - f.bidTimer = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.bidTimer = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.bidTimer = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.bidTimer:SetPoint("LEFT", f.bidTimerHeader, "RIGHT", 8, 0) f.bidTimer:SetAutoFocus(false) f.bidTimer:SetMultiLine(false) @@ -1551,8 +1596,13 @@ function CommDKP:CreateBidWindow() -------------------------------------------------- -- Bid Table -------------------------------------------------- + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.bidTable = CreateFrame("ScrollFrame", "CommDKP_BidWindowTable", f, "FauxScrollFrameTemplate") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then f.bidTable = CreateFrame("ScrollFrame", "CommDKP_BidWindowTable", f, BackdropTemplateMixin and "BackdropTemplate" or nil) - f.bidTable:SetSize(width, height*numrows+3) + end + + f.bidTable:SetSize(width, height*numrows+3) f.bidTable:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, @@ -1560,7 +1610,11 @@ function CommDKP:CreateBidWindow() f.bidTable:SetBackdropColor(0,0,0,0.2) f.bidTable:SetBackdropBorderColor(1,1,1,0.4) f.bidTable.ScrollBar = FauxScrollFrame_GetChildFrames(f.bidTable) - --f.bidTable.ScrollBar:Hide() + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.bidTable.ScrollBar:Hide() + end + f.bidTable.Rows = {} for i=1, numrows do f.bidTable.Rows[i] = BidWindowCreateRow(f.bidTable, i) @@ -1580,7 +1634,12 @@ function CommDKP:CreateBidWindow() local headerButtons = {} mode = core.DB.modes.mode; - f.BidTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.BidTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.BidTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.BidTable_Headers:SetSize(370, 22) f.BidTable_Headers:SetPoint("BOTTOMLEFT", f.bidTable, "TOPLEFT", 0, 1) f.BidTable_Headers:SetBackdrop({ @@ -1658,7 +1717,12 @@ function CommDKP:CreateBidWindow() -- AWARD ITEM ------------------------------------ - f.cost = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.cost = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.cost = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.cost:SetPoint("TOPLEFT", f.bidTable, "BOTTOMLEFT", 71, -15) f.cost:SetAutoFocus(false) f.cost:SetMultiLine(false) diff --git a/Modules/ClassGraph.lua b/Modules/ClassGraph.lua index 7504a117..c4d9d3aa 100644 --- a/Modules/ClassGraph.lua +++ b/Modules/ClassGraph.lua @@ -5,7 +5,14 @@ local L = core.L; function CommDKP:ClassGraph() - local graph = CreateFrame("Frame", "CommDKPClassIcons", CommDKP.ConfigTab1, BackdropTemplateMixin and "BackdropTemplate" or nil) + + local graph; + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + graph = CreateFrame("Frame", "CommDKPClassIcons", CommDKP.ConfigTab1) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + graph = CreateFrame("Frame", "CommDKPClassIcons", CommDKP.ConfigTab1, BackdropTemplateMixin and "BackdropTemplate" or nil) + end graph:SetPoint("TOPLEFT", CommDKP.ConfigTab1, "TOPLEFT", 0, 0) graph:SetBackdropColor(0,0,0,0) @@ -45,7 +52,13 @@ function CommDKP:ClassGraph() end graph.icons[i]:SetColorTexture(0, 0, 0, 1) graph.icons[i]:SetSize(28, 28); - graph.icons[i].bar = CreateFrame("Frame", "CommDKP"..i.."Graph", graph, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + graph.icons[i].bar = CreateFrame("Frame", "CommDKP"..i.."Graph", graph) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + graph.icons[i].bar = CreateFrame("Frame", "CommDKP"..i.."Graph", graph, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + graph.icons[i].bar:SetPoint("BOTTOM", icons[i], "TOP", 0, 5) graph.icons[i].bar:SetBackdropBorderColor(1,1,1,0) graph.icons[i].bar:SetSize(BarWidth, perc_height[i]) diff --git a/Modules/DKPModes.lua b/Modules/DKPModes.lua index e24fced4..753bd927 100644 --- a/Modules/DKPModes.lua +++ b/Modules/DKPModes.lua @@ -22,7 +22,13 @@ function CommDKP:ToggleDKPModesWindow() end function CommDKP:DKPModesFrame_Create() - local f = CreateFrame("Frame", "CommDKP_DKPModesFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_DKPModesFrame", UIParent); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_DKPModesFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + local ActiveMode = core.DB.modes.mode; local ActiveCostType = core.DB.modes.costvalue; @@ -61,7 +67,13 @@ function CommDKP:DKPModesFrame_Create() f.BG:SetTexture("Interface\\AddOns\\CommunityDKP\\Media\\Textures\\menu-bg"); -- TabMenu ScrollFrame and ScrollBar - f.ScrollFrame = CreateFrame("ScrollFrame", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.ScrollFrame = CreateFrame("ScrollFrame", nil, f); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.ScrollFrame = CreateFrame("ScrollFrame", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + f.ScrollFrame:ClearAllPoints(); f.ScrollFrame:SetPoint("TOPLEFT", f, "TOPLEFT", 4, -8); f.ScrollFrame:SetPoint("BOTTOMRIGHT", f, "BOTTOMRIGHT", -3, 4); @@ -77,7 +89,12 @@ function CommDKP:DKPModesFrame_Create() tinsert(UISpecialFrames, f:GetName()); -- Sets frame to close on "Escape" -- Close Button - f.closeContainer = CreateFrame("Frame", "MonDKModesWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeContainer = CreateFrame("Frame", "MonDKModesWindowCloseButtonContainer", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeContainer = CreateFrame("Frame", "MonDKModesWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeContainer:SetPoint("CENTER", f, "TOPRIGHT", -4, 0) f.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, diff --git a/Modules/LootPriceTab.lua b/Modules/LootPriceTab.lua index 982abe7f..d598c694 100644 --- a/Modules/LootPriceTab.lua +++ b/Modules/LootPriceTab.lua @@ -5,7 +5,15 @@ local L = core.L; local function CreateRow(parent, id) -- Create 3 buttons for each row in the list - local f = CreateFrame("Button", "$parentLine"..id, parent, BackdropTemplateMixin and "BackdropTemplate" or nil) + + local f; + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f = CreateFrame("Button", "$parentLine"..id, parent) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f = CreateFrame("Button", "$parentLine"..id, parent, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.PriceInfo = {} f:SetSize(core.TableWidth, core.TableRowHeight) f:SetHighlightTexture("Interface\\AddOns\\CommunityDKP\\Media\\Textures\\ListBox-Highlight"); @@ -288,14 +296,17 @@ function CommDKP:PriceTab_Create() CommDKP.ConfigTab7.PriceTable:SetSize(core.TableWidth, core.TableRowHeight*numOfRows) CommDKP.ConfigTab7.PriceTable:SetPoint("TOPLEFT", 0, -95) - --CommDKP.ConfigTab7.PriceTable:SetBackdrop( { - -- bgFile = "Textures\\white.blp", tile = true, -- White backdrop allows for black background with 1.0 alpha on low alpha containers - -- edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, - -- insets = { left = 0, right = 0, top = 0, bottom = 0 } - --}); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab7.PriceTable:SetBackdrop( { + bgFile = "Textures\\white.blp", tile = true, -- White backdrop allows for black background with 1.0 alpha on low alpha containers + edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, + insets = { left = 0, right = 0, top = 0, bottom = 0 } + }); - --CommDKP.ConfigTab7.PriceTable:SetBackdropColor(0,0,0,0.4); - --CommDKP.ConfigTab7.PriceTable:SetBackdropBorderColor(1,1,1,0.5) + CommDKP.ConfigTab7.PriceTable:SetBackdropColor(0,0,0,0.4); + CommDKP.ConfigTab7.PriceTable:SetBackdropBorderColor(1,1,1,0.5) + end + CommDKP.ConfigTab7.PriceTable:SetClipsChildren(false); CommDKP.ConfigTab7.PriceTable.ScrollBar = FauxScrollFrame_GetChildFrames(CommDKP.ConfigTab7.PriceTable) @@ -314,7 +325,12 @@ function CommDKP:PriceTab_Create() FauxScrollFrame_OnVerticalScroll(self, offset, core.TableRowHeight, CommDKP:PriceTable_Update(offset)) end) - CommDKP.ConfigTab7.PriceTable.Headers = CreateFrame("Frame", "CommDKPPriceTableHeaders", CommDKP.ConfigTab7, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab7.PriceTable.Headers = CreateFrame("Frame", "CommDKPPriceTableHeaders", CommDKP.ConfigTab7) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab7.PriceTable.Headers = CreateFrame("Frame", "CommDKPPriceTableHeaders", CommDKP.ConfigTab7, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab7.PriceTable.Headers:SetSize(500, 22) CommDKP.ConfigTab7.PriceTable.Headers:SetPoint("BOTTOMLEFT", CommDKP.ConfigTab7.PriceTable, "TOPLEFT", 0, 1) CommDKP.ConfigTab7.PriceTable.Headers:SetBackdrop({ diff --git a/Modules/ManageEntries.lua b/Modules/ManageEntries.lua index fdd85aed..3243e101 100644 --- a/Modules/ManageEntries.lua +++ b/Modules/ManageEntries.lua @@ -1074,7 +1074,12 @@ function CommDKP:ManageEntries() ---------------------------------- -- Team name input box ---------------------------------- - CommDKP.ConfigTab3.TeamNameInput = CreateFrame("EditBox", nil, CommDKP.ConfigTab3, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab3.TeamNameInput = CreateFrame("EditBox", nil, CommDKP.ConfigTab3) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab3.TeamNameInput = CreateFrame("EditBox", nil, CommDKP.ConfigTab3, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab3.TeamNameInput:SetAutoFocus(false) CommDKP.ConfigTab3.TeamNameInput:SetMultiLine(false) CommDKP.ConfigTab3.TeamNameInput:SetSize(160, 24) diff --git a/Modules/Modes/DKPModesMain.lua b/Modules/Modes/DKPModesMain.lua index 95d4d466..d02d8405 100644 --- a/Modules/Modes/DKPModesMain.lua +++ b/Modules/Modes/DKPModesMain.lua @@ -319,7 +319,13 @@ function CommDKP:DKPModes_Main() f.DKPModesMain.MaxBidBehaviorHeader:SetText(L["MAXBIDBEHAVIOR"]) -- AntiSnipe Option - f.DKPModesMain.AntiSnipe = CreateFrame("EditBox", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.AntiSnipe = CreateFrame("EditBox", nil, f.DKPModesMain) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.AntiSnipe = CreateFrame("EditBox", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.DKPModesMain.AntiSnipe:SetAutoFocus(false) f.DKPModesMain.AntiSnipe:SetMultiLine(false) f.DKPModesMain.AntiSnipe:SetPoint("TOPLEFT", f.DKPModesMain.RoundDropDown, "BOTTOMLEFT", 18, -15) @@ -495,7 +501,13 @@ function CommDKP:DKPModes_Main() -- Artificial Inflation Editbox if not core.DB.modes.Inflation then core.DB.modes.Inflation = 0 end - f.DKPModesMain.Inflation = CreateFrame("EditBox", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.Inflation = CreateFrame("EditBox", nil, f.DKPModesMain) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.Inflation = CreateFrame("EditBox", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.DKPModesMain.Inflation:SetAutoFocus(false) f.DKPModesMain.Inflation:SetMultiLine(false) f.DKPModesMain.Inflation:SetPoint("TOPLEFT", f.DKPModesMain.CostSelection, "BOTTOMLEFT", 20, -15) @@ -764,7 +776,13 @@ function CommDKP:DKPModes_Main() --- -- Roll Container --- - f.DKPModesMain.RollContainer = CreateFrame("Frame", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.RollContainer = CreateFrame("Frame", nil, f.DKPModesMain); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.RollContainer = CreateFrame("Frame", nil, f.DKPModesMain, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + f.DKPModesMain.RollContainer:SetSize(210, 180); f.DKPModesMain.RollContainer:SetPoint("TOPLEFT", f.DKPModesMain.ChannelsDropDown, "BOTTOMLEFT", -10, -20) f.DKPModesMain.RollContainer:SetBackdrop({ @@ -880,7 +898,13 @@ function CommDKP:DKPModes_Main() --- -- Min Roll Editbox --- - f.DKPModesMain.RollContainer.rollMin = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.RollContainer.rollMin = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.RollContainer.rollMin = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + + f.DKPModesMain.RollContainer.rollMin:SetAutoFocus(false) f.DKPModesMain.RollContainer.rollMin:SetMultiLine(false) f.DKPModesMain.RollContainer.rollMin:SetPoint("TOPLEFT", f.DKPModesMain.RollContainer, "TOPLEFT", 20, -80) @@ -1018,7 +1042,13 @@ function CommDKP:DKPModes_Main() f.DKPModesMain.RollContainer.rollMax.perc:SetShown(core.DB.modes.rolls.UsePerc); -- Percent Rolls Checkbox - f.DKPModesMain.RollContainer.UsePerc = CreateFrame("CheckButton", nil, f.DKPModesMain.RollContainer, "UICheckButtonTemplate"); + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.RollContainer.UsePerc = CreateFrame("CheckButton", nil, f.DKPModesMain.RollContainer, "UICheckButtonTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.RollContainer.UsePerc = CreateFrame("CheckButton", nil, f.DKPModesMain.RollContainer, "UICheckButtonTemplate"); + end + f.DKPModesMain.RollContainer.UsePerc:SetChecked(core.DB.modes.rolls.UsePerc) f.DKPModesMain.RollContainer.UsePerc:SetScale(0.6); f.DKPModesMain.RollContainer.UsePerc.text:SetText(" |cff5151de"..L["USEPERCENTAGE"].."|r"); @@ -1046,7 +1076,12 @@ function CommDKP:DKPModes_Main() end) -- Add to Max Editbox - f.DKPModesMain.RollContainer.AddMax = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.DKPModesMain.RollContainer.AddMax = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.DKPModesMain.RollContainer.AddMax = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.DKPModesMain.RollContainer.AddMax:SetAutoFocus(false) f.DKPModesMain.RollContainer.AddMax:SetMultiLine(false) f.DKPModesMain.RollContainer.AddMax:SetPoint("TOP", f.DKPModesMain.RollContainer.rollMax, "BOTTOM", 0, -30) @@ -1107,16 +1142,14 @@ function CommDKP:DKPModes_Main() -------------- - --- - -- Ni Karma sub section - --- + --- + -- Ni Karma sub section + --- --- -- Max Karma --- - - f.DKPModesMain.RollContainer.maxKarma = CreateFrame("EditBox", nil, f.DKPModesMain.RollContainer, BackdropTemplateMixin and "BackdropTemplate" or nil) f.DKPModesMain.RollContainer.maxKarma:SetAutoFocus(false) f.DKPModesMain.RollContainer.maxKarma:SetMultiLine(false) diff --git a/Modules/Options.lua b/Modules/Options.lua index a4e01ed0..fd91182d 100644 --- a/Modules/Options.lua +++ b/Modules/Options.lua @@ -100,7 +100,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.description:SetText("|CFFcca600"..L["DEFAULTDKPAWARDVALUES"].."|r"); for i=1, 6 do - CommDKP.ConfigTab4.default[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.default[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.default[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.default[i]:SetAutoFocus(false) CommDKP.ConfigTab4.default[i]:SetMultiLine(false) CommDKP.ConfigTab4.default[i]:SetSize(80, 24) @@ -264,7 +269,13 @@ function CommDKP:Options() CommDKP.ConfigTab4.DefaultMinBids.SlotBox = SlotBox; for i=1, 17 do - CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i]:SetAutoFocus(false) CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i]:SetMultiLine(false) CommDKP.ConfigTab4.DefaultMinBids.SlotBox[i]:SetSize(60, 24) @@ -531,7 +542,13 @@ function CommDKP:Options() CommDKP.ConfigTab4.DefaultMaxBids.SlotBox = SlotBox; for i=1, 17 do - CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i] = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + + CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i]:SetAutoFocus(false) CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i]:SetMultiLine(false) CommDKP.ConfigTab4.DefaultMaxBids.SlotBox[i]:SetSize(60, 24) @@ -765,7 +782,11 @@ function CommDKP:Options() end -- Bid Timer Slider CommDKP.ConfigTab4.bidTimerSlider = CreateFrame("SLIDER", "$parentBidTimerSlider", CommDKP.ConfigTab4, "CommDKPOptionsSliderTemplate"); - Mixin(CommDKP.ConfigTab4.bidTimerSlider, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.bidTimerSlider, BackdropTemplateMixin) + end + CommDKP.ConfigTab4.bidTimerSlider:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -794,7 +815,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.bidTimerHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.bidTimerSlider, "TOP", 0, 3); CommDKP.ConfigTab4.bidTimerHeader:SetText(L["BIDTIMER"]) - CommDKP.ConfigTab4.bidTimer = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.bidTimer = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.bidTimer = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.bidTimer:SetAutoFocus(false) CommDKP.ConfigTab4.bidTimer:SetMultiLine(false) CommDKP.ConfigTab4.bidTimer:SetSize(50, 18) @@ -822,6 +848,7 @@ function CommDKP:Options() end -- the end -- Tooltip History Slider + CommDKP.ConfigTab4.TooltipHistorySlider = CreateFrame("SLIDER", "$parentTooltipHistorySlider", CommDKP.ConfigTab4, "CommDKPOptionsSliderTemplate"); if CommDKP.ConfigTab4.bidTimer then CommDKP.ConfigTab4.TooltipHistorySlider:SetPoint("LEFT", CommDKP.ConfigTab4.bidTimerSlider, "RIGHT", 30, 0); @@ -829,7 +856,10 @@ function CommDKP:Options() CommDKP.ConfigTab4.TooltipHistorySlider:SetPoint("TOP", CommDKP.ConfigTab4, "TOP", 1, -107); end - Mixin(CommDKP.ConfigTab4.TooltipHistorySlider, BackdropTemplateMixin) + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.TooltipHistorySlider, BackdropTemplateMixin) + end + CommDKP.ConfigTab4.TooltipHistorySlider:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -854,7 +884,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.TooltipHistoryHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.TooltipHistorySlider, "TOP", 0, 3); CommDKP.ConfigTab4.TooltipHistoryHeader:SetText(L["TTHISTORYCOUNT"]) - CommDKP.ConfigTab4.TooltipHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.TooltipHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.TooltipHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.TooltipHistory:SetAutoFocus(false) CommDKP.ConfigTab4.TooltipHistory:SetMultiLine(false) CommDKP.ConfigTab4.TooltipHistory:SetSize(50, 18) @@ -890,7 +925,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.historySlider:SetPoint("TOPRIGHT", CommDKP.ConfigTab4.TooltipHistorySlider, "BOTTOMLEFT", 56, -49); end - Mixin(CommDKP.ConfigTab4.historySlider, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.historySlider, BackdropTemplateMixin) + end + + CommDKP.ConfigTab4.historySlider:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -916,7 +956,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.HistoryHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.historySlider, "TOP", 0, 3); CommDKP.ConfigTab4.HistoryHeader:SetText(L["LOOTHISTORYLIMIT"]) - CommDKP.ConfigTab4.history = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.history = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.history = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.history:SetAutoFocus(false) CommDKP.ConfigTab4.history:SetMultiLine(false) CommDKP.ConfigTab4.history:SetSize(50, 18) @@ -944,7 +989,11 @@ function CommDKP:Options() -- DKP History Limit Slider CommDKP.ConfigTab4.DKPHistorySlider = CreateFrame("SLIDER", "$parentDKPHistorySlider", CommDKP.ConfigTab4, "CommDKPOptionsSliderTemplate"); - Mixin(CommDKP.ConfigTab4.DKPHistorySlider, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.DKPHistorySlider, BackdropTemplateMixin) + end + CommDKP.ConfigTab4.DKPHistorySlider:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -970,7 +1019,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.DKPHistoryHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.DKPHistorySlider, "TOP", 0, 3); CommDKP.ConfigTab4.DKPHistoryHeader:SetText(L["DKPHISTORYLIMIT"]) - CommDKP.ConfigTab4.DKPHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.DKPHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.DKPHistory = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.DKPHistory:SetAutoFocus(false) CommDKP.ConfigTab4.DKPHistory:SetMultiLine(false) CommDKP.ConfigTab4.DKPHistory:SetSize(50, 18) @@ -998,7 +1052,11 @@ function CommDKP:Options() -- Bid Timer Size Slider CommDKP.ConfigTab4.TimerSizeSlider = CreateFrame("SLIDER", "$parentBidTimerSizeSlider", CommDKP.ConfigTab4, "CommDKPOptionsSliderTemplate"); - Mixin(CommDKP.ConfigTab4.TimerSizeSlider, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.TimerSizeSlider, BackdropTemplateMixin) + end + CommDKP.ConfigTab4.TimerSizeSlider:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -1026,7 +1084,13 @@ function CommDKP:Options() CommDKP.ConfigTab4.DKPHistoryHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.TimerSizeSlider, "TOP", 0, 3); CommDKP.ConfigTab4.DKPHistoryHeader:SetText(L["TIMERSIZE"]) - CommDKP.ConfigTab4.TimerSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.TimerSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.TimerSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + + CommDKP.ConfigTab4.TimerSize:SetAutoFocus(false) CommDKP.ConfigTab4.TimerSize:SetMultiLine(false) CommDKP.ConfigTab4.TimerSize:SetSize(50, 18) @@ -1054,7 +1118,11 @@ function CommDKP:Options() -- UI Scale Size Slider CommDKP.ConfigTab4.CommDKPScaleSize = CreateFrame("SLIDER", "$parentCommDKPScaleSizeSlider", CommDKP.ConfigTab4, "CommDKPOptionsSliderTemplate"); - Mixin(CommDKP.ConfigTab4.CommDKPScaleSize, BackdropTemplateMixin) + + if WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + Mixin(CommDKP.ConfigTab4.CommDKPScaleSize, BackdropTemplateMixin) + end + CommDKP.ConfigTab4.CommDKPScaleSize:SetBackdrop({ bgFile = "Interface\\Buttons\\UI-SliderBar-Background", edgeFile = "Interface\\Buttons\\UI-SliderBar-Border", @@ -1081,7 +1149,12 @@ function CommDKP:Options() CommDKP.ConfigTab4.DKPHistoryHeader:SetPoint("BOTTOM", CommDKP.ConfigTab4.CommDKPScaleSize, "TOP", 0, 3); CommDKP.ConfigTab4.DKPHistoryHeader:SetText(L["MAINGUISIZE"]) - CommDKP.ConfigTab4.UIScaleSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.ConfigTab4.UIScaleSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + CommDKP.ConfigTab4.UIScaleSize = CreateFrame("EditBox", nil, CommDKP.ConfigTab4, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + CommDKP.ConfigTab4.UIScaleSize:SetAutoFocus(false) CommDKP.ConfigTab4.UIScaleSize:SetMultiLine(false) CommDKP.ConfigTab4.UIScaleSize:SetSize(50, 18) diff --git a/Modules/ZeroSumBank.lua b/Modules/ZeroSumBank.lua index 20504d22..b6aac6f5 100644 --- a/Modules/ZeroSumBank.lua +++ b/Modules/ZeroSumBank.lua @@ -86,8 +86,13 @@ function CommDKP:ZeroSumBank_Update() end function CommDKP:ZeroSumBank_Create() - local f = CreateFrame("Frame", "CommDKP_DKPZeroSumBankFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_DKPZeroSumBankFrame", UIParent, "ShadowOverlaySmallTemplate"); + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + local f = CreateFrame("Frame", "CommDKP_DKPZeroSumBankFrame", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil); + end + if not core.DB.modes.ZeroSumBank then core.DB.modes.ZeroSumBank = 0 end f:SetPoint("TOP", UIParent, "TOP", 400, -50); @@ -109,7 +114,13 @@ function CommDKP:ZeroSumBank_Create() f:Hide() -- Close Button - f.closeContainer = CreateFrame("Frame", "CommDKPZeroSumBankWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPZeroSumBankWindowCloseButtonContainer", f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeContainer = CreateFrame("Frame", "CommDKPZeroSumBankWindowCloseButtonContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeContainer:SetPoint("CENTER", f, "TOPRIGHT", -4, 0) f.closeContainer:SetBackdrop({ bgFile = "Textures\\white.blp", tile = true, @@ -119,7 +130,12 @@ function CommDKP:ZeroSumBank_Create() f.closeContainer:SetBackdropBorderColor(1,1,1,0.2) f.closeContainer:SetSize(28, 28) - f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.closeBtn = CreateFrame("Button", nil, f, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.closeBtn:SetPoint("CENTER", f.closeContainer, "TOPRIGHT", -14, -14) f.BankHeader = f:CreateFontString(nil, "OVERLAY") @@ -138,7 +154,12 @@ function CommDKP:ZeroSumBank_Create() f.Boss.Header:SetPoint("RIGHT", f.Boss, "LEFT", -7, 0); f.Boss.Header:SetText(L["BOSS"]..": ") - f.Balance = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.Balance = CreateFrame("EditBox", nil, f) + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.Balance = CreateFrame("EditBox", nil, f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.Balance:SetPoint("TOPLEFT", f, "TOPLEFT", 70, -65) f.Balance:SetAutoFocus(false) f.Balance:SetMultiLine(false) @@ -232,7 +253,13 @@ function CommDKP:ZeroSumBank_Create() end) -- Loot List Frame - f.LootFrame = CreateFrame("Frame", "CommDKPZeroSumBankLootListContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + f.LootFrame = CreateFrame("Frame", "CommDKPZeroSumBankLootListContainer", f, "ShadowOverlaySmallTemplate") + elseif WOW_PROJECT_ID == WOW_PROJECT_BURNING_CRUSADE_CLASSIC then + f.LootFrame = CreateFrame("Frame", "CommDKPZeroSumBankLootListContainer", f, BackdropTemplateMixin and "BackdropTemplate" or nil) + end + f.LootFrame:SetPoint("TOPRIGHT", f.IncludeStandby, "BOTTOM", 95, -5) f.LootFrame:SetSize(305, 190) f.LootFrame:SetBackdrop({ diff --git a/TableFunctions.lua b/TableFunctions.lua index 624f4771..4e316a6c 100644 --- a/TableFunctions.lua +++ b/TableFunctions.lua @@ -906,13 +906,17 @@ function CommDKP:DKPTable_Create() CommDKP.DKPTable = CreateFrame("ScrollFrame", "CommDKPDisplayScrollFrame", CommDKP.UIConfig, "FauxScrollFrameTemplate") CommDKP.DKPTable:SetSize(core.TableWidth, core.TableRowHeight*core.TableNumRows+3) CommDKP.DKPTable:SetPoint("LEFT", 20, 3) - --CommDKP.DKPTable:SetBackdrop( { - -- bgFile = "Textures\\white.blp", tile = true, -- White backdrop allows for black background with 1.0 alpha on low alpha containers - -- edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, - -- insets = { left = 0, right = 0, top = 0, bottom = 0 } - --}); - --CommDKP.DKPTable:SetBackdropColor(0,0,0,0.4); - --CommDKP.DKPTable:SetBackdropBorderColor(1,1,1,0.5) + + if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then + CommDKP.DKPTable:SetBackdrop( { + bgFile = "Textures\\white.blp", tile = true, -- White backdrop allows for black background with 1.0 alpha on low alpha containers + edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2, + insets = { left = 0, right = 0, top = 0, bottom = 0 } + }); + CommDKP.DKPTable:SetBackdropColor(0,0,0,0.4); + CommDKP.DKPTable:SetBackdropBorderColor(1,1,1,0.5) + end + CommDKP.DKPTable:SetClipsChildren(false); CommDKP.DKPTable.ScrollBar = FauxScrollFrame_GetChildFrames(CommDKP.DKPTable)