Skip to content

Commit

Permalink
Merge pull request #165 from Vapok/tbc_prep
Browse files Browse the repository at this point in the history
Tbc prep
  • Loading branch information
Taidtuskecyh authored May 19, 2021
2 parents c321598 + 79695d8 commit dd25cca
Show file tree
Hide file tree
Showing 27 changed files with 590 additions and 325 deletions.
30 changes: 16 additions & 14 deletions CommunityDKP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function CommDKP_RestoreFilterOptions() -- restores default filter selections
end

function CommDKP:Toggle() -- toggles IsShown() state of CommDKP.UIConfig, the entire addon window
core.CommDKPUI = CommDKP.UIConfig or CommDKP:CreateMenu();
core.CommDKPUI = core.CommDKPUI or CommDKP:CreateMenu();
core.CommDKPUI:SetShown(not core.CommDKPUI:IsShown())
CommDKP.UIConfig:SetFrameLevel(10)
CommDKP.UIConfig:SetClampedToScreen(true)
Expand Down Expand Up @@ -238,8 +238,7 @@ function CommDKP:SortDKPTable(id, reset) -- reorganizes core.WorkingTable
end

function CommDKP:CreateMenu()

CommDKP.UIConfig = CreateFrame("Frame", "CommDKPConfig", UIParent, "ShadowOverlaySmallTemplate") --UIPanelDialogueTemplate, ShadowOverlaySmallTemplate
CommDKP.UIConfig = CreateFrame("Frame", "CommDKPConfig", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil) --UIPanelDialogueTemplate, ShadowOverlaySmallTemplate
CommDKP.UIConfig:SetPoint("CENTER", UIParent, "CENTER", -250, 100);
CommDKP.UIConfig:SetSize(550, 590);
CommDKP.UIConfig:SetBackdrop({
Expand All @@ -263,8 +262,9 @@ function CommDKP:CreateMenu()
if core.BiddingWindow then core.BiddingWindow:SetFrameLevel(2) end
end)
-- Close Button
CommDKP.UIConfig.closeContainer = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig)
CommDKP.UIConfig.closeContainer = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.UIConfig.closeContainer:SetPoint("CENTER", CommDKP.UIConfig, "TOPRIGHT", -4, 0)
Mixin(CommDKP.UIConfig.closeContainer, BackdropTemplateMixin)
CommDKP.UIConfig.closeContainer:SetBackdrop({
bgFile = "Textures\\white.blp", tile = true,
edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 3,
Expand All @@ -273,7 +273,7 @@ function CommDKP:CreateMenu()
CommDKP.UIConfig.closeContainer:SetBackdropBorderColor(1,1,1,0.2)
CommDKP.UIConfig.closeContainer:SetSize(28, 28)

CommDKP.UIConfig.closeBtn = CreateFrame("Button", nil, CommDKP.UIConfig, "UIPanelCloseButton")
CommDKP.UIConfig.closeBtn = CreateFrame("Button", nil, CommDKP.UIConfig, "UIPanelCloseButton", BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.UIConfig.closeBtn:SetPoint("CENTER", CommDKP.UIConfig.closeContainer, "TOPRIGHT", -14, -14)
tinsert(UISpecialFrames, CommDKP.UIConfig:GetName()); -- Sets frame to close on "Escape"
---------------------------------------
Expand All @@ -285,9 +285,10 @@ function CommDKP:CreateMenu()
---------------------------------------
-- DKP Table Header and Sort Buttons
---------------------------------------
CommDKP.DKPTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", CommDKP.UIConfig)
CommDKP.DKPTable_Headers = CreateFrame("Frame", "CommDKPDKPTableHeaders", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.DKPTable_Headers:SetSize(500, 22)
CommDKP.DKPTable_Headers:SetPoint("BOTTOMLEFT", CommDKP.DKPTable, "TOPLEFT", 0, 1)
Mixin(CommDKP.DKPTable_Headers, BackdropTemplateMixin)
CommDKP.DKPTable_Headers:SetBackdrop({
bgFile = "Textures\\white.blp", tile = true,
edgeFile = "Interface\\AddOns\\CommunityDKP\\Media\\Textures\\edgefile.tga", tile = true, tileSize = 1, edgeSize = 2,
Expand All @@ -298,9 +299,9 @@ function CommDKP:CreateMenu()
---------------------------------------
-- Sort Buttons
---------------------------------------
SortButtons.player = CreateFrame("Button", "$ParentSortButtonPlayer", CommDKP.DKPTable_Headers)
SortButtons.class = CreateFrame("Button", "$ParentSortButtonClass", CommDKP.DKPTable_Headers)
SortButtons.dkp = CreateFrame("Button", "$ParentSortButtonDkp", CommDKP.DKPTable_Headers)
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)
SortButtons.class:SetPoint("BOTTOM", CommDKP.DKPTable_Headers, "BOTTOM", 0, 2)
SortButtons.player:SetPoint("RIGHT", SortButtons.class, "LEFT")
SortButtons.dkp:SetPoint("LEFT", SortButtons.class, "RIGHT")
Expand Down Expand Up @@ -395,7 +396,7 @@ function CommDKP:CreateMenu()
------------------------------
-- Search Box
------------------------------
CommDKP.UIConfig.search = CreateFrame("EditBox", nil, CommDKP.UIConfig)
CommDKP.UIConfig.search = CreateFrame("EditBox", nil, CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.UIConfig.search:SetPoint("BOTTOMLEFT", CommDKP.UIConfig, "BOTTOMLEFT", 50, 18)
CommDKP.UIConfig.search:SetAutoFocus(false)
CommDKP.UIConfig.search:SetMultiLine(false)
Expand Down Expand Up @@ -535,7 +536,7 @@ function CommDKP:CreateMenu()
---------------------------------------
-- Expand / Collapse Arrow
---------------------------------------
CommDKP.UIConfig.expand = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig)
CommDKP.UIConfig.expand = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.UIConfig.expand:SetPoint("LEFT", CommDKP.UIConfig, "RIGHT", 0, 0)
CommDKP.UIConfig.expand:SetBackdrop({
bgFile = "Textures\\white.blp", tile = true,
Expand Down Expand Up @@ -567,7 +568,7 @@ function CommDKP:CreateMenu()
end)

-- Title Frame (top/center)
CommDKP.UIConfig.TitleBar = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, "ShadowOverlaySmallTemplate")
CommDKP.UIConfig.TitleBar = CreateFrame("Frame", "CommDKPTitle", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.UIConfig.TitleBar:SetPoint("BOTTOM", SortButtons.class, "TOP", 0, 10)
CommDKP.UIConfig.TitleBar:SetBackdrop({
bgFile = "Textures\\white.blp", tile = true,
Expand All @@ -586,7 +587,7 @@ function CommDKP:CreateMenu()
-- CHANGE LOG WINDOW
---------------------------------------
if core.DB.defaults.HideChangeLogs < core.BuildNumber then
CommDKP.ChangeLogDisplay = CreateFrame("Frame", "CommDKP_ChangeLogDisplay", UIParent, "ShadowOverlaySmallTemplate");
CommDKP.ChangeLogDisplay = CreateFrame("Frame", "CommDKP_ChangeLogDisplay", UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil);

CommDKP.ChangeLogDisplay:SetPoint("TOP", UIParent, "TOP", 0, -200);
CommDKP.ChangeLogDisplay:SetSize(600, 100);
Expand Down Expand Up @@ -631,7 +632,7 @@ 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)
CommDKP.ChangeLogDisplay.closeContainer = CreateFrame("Frame", "CommDKPChangeLogClose", CommDKP.ChangeLogDisplay, BackdropTemplateMixin and "BackdropTemplate" or nil)
CommDKP.ChangeLogDisplay.closeContainer:SetPoint("CENTER", CommDKP.ChangeLogDisplay, "TOPRIGHT", -4, 0)
CommDKP.ChangeLogDisplay.closeContainer:SetBackdrop({
bgFile = "Textures\\white.blp", tile = true,
Expand Down Expand Up @@ -671,6 +672,7 @@ function CommDKP:CreateMenu()

local logHeight = CommDKP.ChangeLogDisplay.ChangeLogHeader:GetHeight() + CommDKP.ChangeLogDisplay.Notes:GetHeight() + CommDKP.ChangeLogDisplay.VerNumber:GetHeight() + CommDKP.ChangeLogDisplay.ChangeLogText:GetHeight();
CommDKP.ChangeLogDisplay:SetSize(800, logHeight); -- resize container

end
---------------------------------------
-- VERSION IDENTIFIER
Expand Down
13 changes: 7 additions & 6 deletions ConfigMenuTabs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function CommDKP:ConfigMenuTabs()
---------------------------------------
-- TabMenu
---------------------------------------
CommDKP.UIConfig.TabMenu = CreateFrame("Frame", "CommDKPCommDKP.ConfigTabMenu", CommDKP.UIConfig);
CommDKP.UIConfig.TabMenu = CreateFrame("Frame", "CommDKPCommDKP.ConfigTabMenu", CommDKP.UIConfig, BackdropTemplateMixin and "BackdropTemplate" or nil);
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( {
Expand All @@ -146,11 +146,12 @@ function CommDKP:ConfigMenuTabs()
CommDKP.UIConfig.TabMenu.ScrollFrame:SetClipsChildren(false);
CommDKP.UIConfig.TabMenu.ScrollFrame:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel);

CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar:Hide();
CommDKP.UIConfig.TabMenu.ScrollFrame.ScrollBar = CreateFrame("Slider", nil, CommDKP.UIConfig.TabMenu.ScrollFrame, "UIPanelScrollBarTrimTemplate")
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.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"]);

Expand Down
6 changes: 4 additions & 2 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function CommDKP:CheckOfficer() -- checks if user is an officer IF core.IsO
if not core.InitStart then
return
end

if core.IsOfficer == nil then -- used as a redundency as it should be set on load in init.lua GUILD_ROSTER_UPDATE event
if CommDKP:GetGuildRankIndex(UnitName("player")) == 1 then -- automatically gives permissions above all settings if player is guild leader
core.IsOfficer = true
Expand All @@ -269,6 +270,7 @@ function CommDKP:CheckOfficer() -- checks if user is an officer IF core.IsO
core.IsOfficer = false;
end
end

end

function CommDKP:GetGuildRankGroup(index) -- returns all members within a specific rank index as well as their index in the guild list (for use with GuildRosterSetPublicNote(index, "msg") and GuildRosterSetOfficerNote)
Expand Down Expand Up @@ -436,15 +438,15 @@ function CommDKP:BroadcastTimer(seconds, ...) -- broadcasts timer and star
end

function CommDKP:CreateContainer(parent, name, header)
local f = CreateFrame("Frame", "CommDKP"..name, parent);
local f = CreateFrame("Frame", "CommDKP"..name, parent, BackdropTemplateMixin and "BackdropTemplate" or nil);
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 }
});
f:SetBackdropColor(0,0,0,0.9);
f:SetBackdropBorderColor(1,1,1,0.5)

f.header = CreateFrame("Frame", "CommDKP"..name.."Header", f)
f.header = CreateFrame("Frame", "CommDKP"..name.."Header", f, BackdropTemplateMixin and "BackdropTemplate" or nil)
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 }
Expand Down
2 changes: 1 addition & 1 deletion Data/TableUpgrades.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,4 @@ function CommDKP:RefactorMinBidItemTable(dbTable)
end
CommDKP:Print("Finished MinBid Table Upgrade!");
return newTable
end
end
6 changes: 3 additions & 3 deletions Localization/Localization.cn.lua
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,8 @@ if GetLocale() == "zhCN" then
MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE:

--TODO TRANSLATE:
CHANGELOG1 = "CommunityDKP - v3.2.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand All @@ -830,5 +830,5 @@ if GetLocale() == "zhCN" then
CHANGELOG8 = "CommunityDKP Discord: https://discord.gg/dXXK4vH",
CHANGELOG9 = "",
CHANGELOG10 = ""
}
}
end
4 changes: 2 additions & 2 deletions Localization/Localization.de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,8 @@ 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.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,8 @@ 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.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ 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.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -873,8 +873,8 @@ 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.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.kr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ if GetLocale() == "koKR" then
MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE:

--TODO TRANSLATE:
CHANGELOG1 = "CommunityDKP - v3.2.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,8 @@ if GetLocale() == "ruRU" then
MIGRATIONCOMPLETED = "Миграция завершена.|n|nПожалуйста отключите MonolithDKP и перезагрузите интерфейс.",

--TODO TRANSLATE:
CHANGELOG1 = "CommunityDKP - v3.2.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.se.lua
Original file line number Diff line number Diff line change
Expand Up @@ -793,8 +793,8 @@ core.L = {
MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.",

--TODO TRANSLATE:
CHANGELOG1 = "CommunityDKP - v3.2.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
4 changes: 2 additions & 2 deletions Localization/Localization.tw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -820,8 +820,8 @@ if GetLocale() == "zhTW" then
MIGRATIONCOMPLETED = "Migration complete.|n|nPlease disable MonolithDKP and /reload the UI.", --TODO TRANSLATE:

--TODO TRANSLATE:
CHANGELOG1 = "CommunityDKP - v3.2.4-r62",
CHANGELOG2 = "fixed history display on mouseover",
CHANGELOG1 = "CommunityDKP - v3.2.5-r62",
CHANGELOG2 = " - Hopefully made this work in pre-patch",
CHANGELOG3 = "",
CHANGELOG4 = "",
CHANGELOG5 = "",
Expand Down
Loading

0 comments on commit dd25cca

Please sign in to comment.