Skip to content

Commit

Permalink
covered rest of UIDropDownMenu calls to LibDD
Browse files Browse the repository at this point in the history
  • Loading branch information
Taidtuskecyh authored and Taidtuskecyh committed Sep 2, 2021
1 parent 7e117d6 commit 3ef7bf9
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 82 deletions.
10 changes: 5 additions & 5 deletions CommunityDKP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ function CommDKP:CreateMenu()
-- center column dropdown (class, rank, spec etc..)
SortButtons.class.t = CreateFrame("FRAME", "CommDKPSortColDropdown", SortButtons.class, "CommunityDKPTableHeaderDropDownMenuTemplate")
SortButtons.class.t:SetPoint("CENTER", SortButtons.class, "CENTER", 4, -3)
UIDropDownMenu_JustifyText(SortButtons.class.t, "CENTER")
LibDD:UIDropDownMenu_JustifyText(SortButtons.class.t, "CENTER")
LibDD:UIDropDownMenu_SetWidth(SortButtons.class.t, 80)
UIDropDownMenu_SetText(SortButtons.class.t, L["CLASS"])
LibDD:UIDropDownMenu_SetText(SortButtons.class.t, L["CLASS"])
LibDD:UIDropDownMenu_Initialize(SortButtons.class.t, function(self, level, menuList)

local reason = LibDD:UIDropDownMenu_CreateInfo()
Expand All @@ -397,7 +397,7 @@ function CommDKP:CreateMenu()
function SortButtons.class.t:SetValue(newValue, arg2)
core.CenterSort = newValue
SortButtons.class.Id = newValue;
UIDropDownMenu_SetText(SortButtons.class.t, arg2)
LibDD:UIDropDownMenu_SetText(SortButtons.class.t, arg2)
CommDKP:SortDKPTable(newValue, "reset")
core.currentSort = newValue;
CloseDropDownMenus()
Expand Down Expand Up @@ -526,7 +526,7 @@ function CommDKP:CreateMenu()
end
)
LibDD:UIDropDownMenu_SetWidth(CommDKP.UIConfig.TeamViewChangerDropDown, 150)
UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP:GetCurrentTeamName())
LibDD:UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP:GetCurrentTeamName())

-- Create and bind the initialization function to the dropdown menu
LibDD:UIDropDownMenu_Initialize(CommDKP.UIConfig.TeamViewChangerDropDown,
Expand Down Expand Up @@ -556,7 +556,7 @@ function CommDKP:CreateMenu()
if core.RaidInProgress == false and core.RaidInPause == false then
CommDKP:SetCurrentTeam(arg2)
CommDKP:SortDKPTable(core.currentSort, "reset")
UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, arg1)
LibDD:UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, arg1)
else
StaticPopupDialogs["RAID_IN_PROGRESS"] = {
text = L["TEAMCHANGERAIDINPROGRESS"],
Expand Down
2 changes: 1 addition & 1 deletion Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ end
function CommDKP:SetCurrentTeam(index)
CommDKP:GetTable(CommDKP_DB, false)["defaults"]["CurrentTeam"] = tostring(index);
CommDKP:StatusVerify_Update();
UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP:GetCurrentTeamName());
LibDD:UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP:GetCurrentTeamName());

-- reset dkp table and update it
core.WorkingTable = CommDKP:GetTable(CommDKP_DKPTable, true);
Expand Down
10 changes: 5 additions & 5 deletions Libs/LibUIDropDownMenu/LibUIDropDownMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1267,10 +1267,10 @@ function lib:UIDropDownMenu_Refresh(frame, useValue, dropdownLevel)
if (button.iconOnly and icon and button.icon) then
lib:UIDropDownMenu_SetIconImage(icon, button.icon, button.iconInfo);
elseif ( useValue ) then
lib:UIDropDownMenu_SetText(frame, button.value);
lib:LibDD:UIDropDownMenu_SetText(frame, button.value);
icon:Hide();
else
lib:UIDropDownMenu_SetText(frame, button:GetText());
lib:LibDD:UIDropDownMenu_SetText(frame, button:GetText());
icon:Hide();
end
end
Expand All @@ -1292,7 +1292,7 @@ function lib:UIDropDownMenu_Refresh(frame, useValue, dropdownLevel)
end
end
if(somethingChecked == nil) then
lib:UIDropDownMenu_SetText(frame, VIDEO_QUALITY_LABEL6);
lib:LibDD:UIDropDownMenu_SetText(frame, VIDEO_QUALITY_LABEL6);
local icon = GetChild(frame, frame:GetName(), "Icon");
icon:Hide();
end
Expand Down Expand Up @@ -1702,7 +1702,7 @@ function lib:UIDropDownMenu_SetButtonWidth(frame, width)
frame.noResize = 1;
end

function lib:UIDropDownMenu_SetText(frame, text)
function lib:LibDD:UIDropDownMenu_SetText(frame, text)
local frameName = frame:GetName();
GetChild(frame, frameName, "Text"):SetText(text);
end
Expand All @@ -1717,7 +1717,7 @@ function lib:UIDropDownMenu_ClearAll(frame)
frame.selectedID = nil;
frame.selectedName = nil;
frame.selectedValue = nil;
lib:UIDropDownMenu_SetText(frame, "");
lib:LibDD:UIDropDownMenu_SetText(frame, "");

local button, checkImage, uncheckImage;
for i=1, L_UIDROPDOWNMENU_MAXBUTTONS do
Expand Down
12 changes: 6 additions & 6 deletions Modules/AdjustDKP.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function CommDKP:AdjustDKPTab_Create()
CommDKP.ConfigTab2.reasonDropDown = CreateFrame("FRAME", "CommDKPConfigReasonDropDown", CommDKP.ConfigTab2, "CommunityDKPUIDropDownMenuTemplate")
CommDKP.ConfigTab2.reasonDropDown:SetPoint("TOPLEFT", CommDKP.ConfigTab2.description, "BOTTOMLEFT", -23, -60)
LibDD:UIDropDownMenu_SetWidth(CommDKP.ConfigTab2.reasonDropDown, 150)
UIDropDownMenu_SetText(CommDKP.ConfigTab2.reasonDropDown, L["SELECTREASON"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.reasonDropDown, L["SELECTREASON"])

-- Create and bind the initialization function to the dropdown menu
LibDD:UIDropDownMenu_Initialize(CommDKP.ConfigTab2.reasonDropDown, function(self, level, menuList)
Expand Down Expand Up @@ -244,18 +244,18 @@ function CommDKP:AdjustDKPTab_Create()
function CommDKP.ConfigTab2.reasonDropDown:SetValue(newValue)
if curReason ~= newValue then curReason = newValue else curReason = nil end

UIDropDownMenu_SetText(CommDKP.ConfigTab2.reasonDropDown, curReason)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.reasonDropDown, curReason)

if (curReason == L["ONTIMEBONUS"]) then CommDKP.ConfigTab2.addDKP:SetNumber(core.DB.DKPBonus.OnTimeBonus); CommDKP.ConfigTab2.BossKilledDropdown:Hide()
elseif (curReason == L["BOSSKILLBONUS"]) then
CommDKP.ConfigTab2.addDKP:SetNumber(core.DB.DKPBonus.BossKillBonus);
CommDKP.ConfigTab2.BossKilledDropdown:Show()
UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
elseif (curReason == L["RAIDCOMPLETIONBONUS"]) then CommDKP.ConfigTab2.addDKP:SetNumber(core.DB.DKPBonus.CompletionBonus); CommDKP.ConfigTab2.BossKilledDropdown:Hide()
elseif (curReason == L["NEWBOSSKILLBONUS"]) then
CommDKP.ConfigTab2.addDKP:SetNumber(core.DB.DKPBonus.NewBossKillBonus);
CommDKP.ConfigTab2.BossKilledDropdown:Show()
UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
elseif (curReason == L["UNEXCUSEDABSENCE"]) then CommDKP.ConfigTab2.addDKP:SetNumber(core.DB.DKPBonus.UnexcusedAbsence); CommDKP.ConfigTab2.BossKilledDropdown:Hide()
else CommDKP.ConfigTab2.addDKP:SetText(""); CommDKP.ConfigTab2.BossKilledDropdown:Hide() end

Expand Down Expand Up @@ -331,7 +331,7 @@ function CommDKP:AdjustDKPTab_Create()
CommDKP.ConfigTab2.BossKilledDropdown:SetPoint("TOPLEFT", CommDKP.ConfigTab2.reasonDropDown, "BOTTOMLEFT", 0, 2)
CommDKP.ConfigTab2.BossKilledDropdown:Hide()
LibDD:UIDropDownMenu_SetWidth(CommDKP.ConfigTab2.BossKilledDropdown, 210)
UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, L["SELECTBOSS"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, L["SELECTBOSS"])

LibDD:UIDropDownMenu_Initialize(CommDKP.ConfigTab2.BossKilledDropdown, function(self, level, menuList)

Expand Down Expand Up @@ -428,7 +428,7 @@ function CommDKP:AdjustDKPTab_Create()
if curReason ~= L["BOSSKILLBONUS"] and curReason ~= L["NEWBOSSKILLBONUS"] then
CommDKP.ConfigTab2.reasonDropDown:SetValue(L["BOSSKILLBONUS"])
end
UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab2.BossKilledDropdown, core.CurrentRaidZone..": "..core.LastKilledBoss)
CloseDropDownMenus()
end

Expand Down
28 changes: 14 additions & 14 deletions Modules/Award.lua
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ local function AwardConfirm_Create()
f.team = CreateFrame("FRAME", "CommDKPAwardConfirmPlayerDropDown", f, "CommunityDKPUIDropDownMenuTemplate")
f.team:SetPoint("LEFT", f.teamHeader, "RIGHT", -15, 0)
LibDD:UIDropDownMenu_SetWidth(f.team, 150)
UIDropDownMenu_JustifyText(f.team, "LEFT")
LibDD:UIDropDownMenu_JustifyText(f.team, "LEFT")

----------------------------------
-- Player row
Expand All @@ -333,7 +333,7 @@ local function AwardConfirm_Create()
f.player = CreateFrame("FRAME", "CommDKPAwardConfirmPlayerDropDown", f, "CommunityDKPUIDropDownMenuTemplate")
f.player:SetPoint("LEFT", f.playerHeader, "RIGHT", -15, 0)
LibDD:UIDropDownMenu_SetWidth(f.player, 150)
UIDropDownMenu_JustifyText(f.player, "LEFT")
LibDD:UIDropDownMenu_JustifyText(f.player, "LEFT")

----------------------------------
-- Item row
Expand Down Expand Up @@ -413,7 +413,7 @@ local function AwardConfirm_Create()
f.bossDropDown = CreateFrame("FRAME", "CommDKPAwardConfirmBossDropDown", f, "CommunityDKPUIDropDownMenuTemplate")
f.bossDropDown:SetPoint("LEFT", f.bossHeader, "RIGHT", -15, -2)
LibDD:UIDropDownMenu_SetWidth(f.bossDropDown, 150)
UIDropDownMenu_JustifyText(f.bossDropDown, "LEFT")
LibDD:UIDropDownMenu_JustifyText(f.bossDropDown, "LEFT")

----------------------------------
-- Zone row
Expand All @@ -428,7 +428,7 @@ local function AwardConfirm_Create()
f.zoneDropDown = CreateFrame("FRAME", "CommDKPAwardConfirmBossDropDown", f, "CommunityDKPUIDropDownMenuTemplate")
f.zoneDropDown:SetPoint("LEFT", f.zoneHeader, "RIGHT", -15, -2)
LibDD:UIDropDownMenu_SetWidth(f.zoneDropDown, 150)
UIDropDownMenu_JustifyText(f.zoneDropDown, "LEFT")
LibDD:UIDropDownMenu_JustifyText(f.zoneDropDown, "LEFT")

----------------------------------
-- Buttons
Expand Down Expand Up @@ -524,12 +524,12 @@ function CommDKP:AwardConfirm(player, cost, boss, zone, loot, reassign)
end
)
-- Show which team is currently the current one
UIDropDownMenu_SetText(core.AwardConfirm.team, CommDKP:GetCurrentTeamName())
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.team, CommDKP:GetCurrentTeamName())

if player then
UIDropDownMenu_SetText(core.AwardConfirm.player, "|c"..class.hex..player.."|r")
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.player, "|c"..class.hex..player.."|r")
else
UIDropDownMenu_SetText(core.AwardConfirm.player, "")
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.player, "")
end

LibDD:UIDropDownMenu_Initialize(core.AwardConfirm.player, function(self, level, menuList)
Expand Down Expand Up @@ -571,11 +571,11 @@ function CommDKP:AwardConfirm(player, cost, boss, zone, loot, reassign)
end
end)

UIDropDownMenu_SetText(core.AwardConfirm.bossDropDown, curBoss)
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.bossDropDown, curBoss)
LibDD:UIDropDownMenu_Initialize(core.AwardConfirm.bossDropDown, function(self, level, menuList) -- BOSS dropdown

UIDropDownMenu_SetAnchor(core.AwardConfirm.bossDropDown, 10, 10, "TOPLEFT", core.AwardConfirm.bossDropDown, "BOTTOMLEFT")
--UIDropDownMenu_JustifyText(core.AwardConfirm.bossDropDown, "LEFT")
--LibDD:UIDropDownMenu_JustifyText(core.AwardConfirm.bossDropDown, "LEFT")
local reason = LibDD:UIDropDownMenu_CreateInfo()
local tempNPCs = {};

Expand All @@ -600,11 +600,11 @@ function CommDKP:AwardConfirm(player, cost, boss, zone, loot, reassign)
end
end)

UIDropDownMenu_SetText(core.AwardConfirm.zoneDropDown, curZone)
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.zoneDropDown, curZone)
LibDD:UIDropDownMenu_Initialize(core.AwardConfirm.zoneDropDown, function(self, level, menuList) -- ZONE dropdown

UIDropDownMenu_SetAnchor(core.AwardConfirm.zoneDropDown, 10, 10, "TOPLEFT", core.AwardConfirm.zoneDropDown, "BOTTOMLEFT")
--UIDropDownMenu_JustifyText(core.AwardConfirm.bossDropDown, "LEFT")
--LibDD:UIDropDownMenu_JustifyText(core.AwardConfirm.bossDropDown, "LEFT")
local reason = LibDD:UIDropDownMenu_CreateInfo()
local tempZones = {};

Expand All @@ -627,18 +627,18 @@ function CommDKP:AwardConfirm(player, cost, boss, zone, loot, reassign)

function core.AwardConfirm.player:SetValue(newValue, arg2) ---- PLAYER dropdown function
if player ~= newValue then player = newValue end
UIDropDownMenu_SetText(core.AwardConfirm.player, arg2)
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.player, arg2)
CloseDropDownMenus()
end

function core.AwardConfirm.bossDropDown:SetValue(newValue) ---- BOSS dropdown function
UIDropDownMenu_SetText(core.AwardConfirm.bossDropDown, newValue)
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.bossDropDown, newValue)
curBoss = newValue;
CloseDropDownMenus()
end

function core.AwardConfirm.zoneDropDown:SetValue(newValue) ---- ZONE dropdown function
UIDropDownMenu_SetText(core.AwardConfirm.zoneDropDown, newValue)
LibDD:UIDropDownMenu_SetText(core.AwardConfirm.zoneDropDown, newValue)
curZone = newValue;
CloseDropDownMenus()
end
Expand Down
4 changes: 2 additions & 2 deletions Modules/DKPHistory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ function CommDKP:DKPHistoryFilterBox_Create()
filterDropdown:SetPoint("TOPRIGHT", CommDKP.ConfigTab6, "TOPRIGHT", -13, -11)

LibDD:UIDropDownMenu_SetWidth(filterDropdown, 150)
UIDropDownMenu_SetText(filterDropdown, curfilterName or L["NOFILTER"])
LibDD:UIDropDownMenu_SetText(filterDropdown, curfilterName or L["NOFILTER"])

-- Dropdown Menu Function
function filterDropdown:FilterSetValue(newValue, arg2)
if curfilterName ~= newValue then curfilterName = newValue else curfilterName = nil end
UIDropDownMenu_SetText(filterDropdown, arg2)
LibDD:UIDropDownMenu_SetText(filterDropdown, arg2)

if newValue == L["NOFILTER"] then
filter = nil;
Expand Down
10 changes: 5 additions & 5 deletions Modules/LootHistory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ function CommDKP:CreateSortBox()
sortDropdown:SetPoint("TOPRIGHT", CommDKP.ConfigTab5, "TOPRIGHT", -13, -11)

LibDD:UIDropDownMenu_SetWidth(sortDropdown, 150)
UIDropDownMenu_SetText(sortDropdown, curDropDownMenuFilterCategory or "Filter Name")
LibDD:UIDropDownMenu_SetText(sortDropdown, curDropDownMenuFilterCategory or "Filter Name")

-- Dropdown Menu Function
function sortDropdown:FilterSetValue(newValue, arg2)
Expand Down Expand Up @@ -353,16 +353,16 @@ function CommDKP:CreateSortBox()

if curDropDownMenuFilterCategory == nil and curfilterValue == nil then
curSelected = 0
UIDropDownMenu_SetText(sortDropdown, L["NOFILTER"])
LibDD:UIDropDownMenu_SetText(sortDropdown, L["NOFILTER"])
elseif arg2 == L["NOFILTER"] or arg2 == L["DELETEDENTRY"] then
curSelected = 0
UIDropDownMenu_SetText(sortDropdown, newValue)
LibDD:UIDropDownMenu_SetText(sortDropdown, newValue)
elseif arg2 == L["ITEMS"] then
curSelected = self.menuList
UIDropDownMenu_SetText(sortDropdown, newValue)
LibDD:UIDropDownMenu_SetText(sortDropdown, newValue)
elseif arg2 == L["PLAYERS"] then
curSelected = self.menuList
UIDropDownMenu_SetText(sortDropdown, self.value)
LibDD:UIDropDownMenu_SetText(sortDropdown, self.value)
end

if curDropDownMenuFilterCategory == nil and curfilterValue == nil then
Expand Down
22 changes: 11 additions & 11 deletions Modules/ManageEntries.lua
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ function CommDKP:ManageEntries()
end
)
LibDD:UIDropDownMenu_SetWidth(CommDKP.ConfigTab3.GuildRankDropDown, 105)
UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, "Select Rank")
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, "Select Rank")

-- Create and bind the initialization function to the dropdown menu
LibDD:UIDropDownMenu_Initialize(CommDKP.ConfigTab3.GuildRankDropDown,
Expand All @@ -683,11 +683,11 @@ function CommDKP:ManageEntries()
if curRank ~= arg1 then
curRank = arg1
curIndex = arg2
UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, arg1)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, arg1)
else
curRank = nil
curIndex = nil
UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, L["SELECTRANK"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.GuildRankDropDown, L["SELECTRANK"])
end

CloseDropDownMenus()
Expand Down Expand Up @@ -1034,7 +1034,7 @@ function CommDKP:ManageEntries()
end
)
LibDD:UIDropDownMenu_SetWidth(CommDKP.ConfigTab3.TeamListDropDown, 105)
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])

-- Create and bind the initialization function to the dropdown menu
LibDD:UIDropDownMenu_Initialize(CommDKP.ConfigTab3.TeamListDropDown,
Expand Down Expand Up @@ -1062,13 +1062,13 @@ function CommDKP:ManageEntries()
if selectedTeamIndex ~= arg2 then
selectedTeam = arg1
selectedTeamIndex = arg2
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, arg1)
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, arg1)
CommDKP.ConfigTab3.TeamNameInput:SetText(arg1)
else
selectedTeam = nil
selectedTeamIndex = nil
CommDKP.ConfigTab3.TeamNameInput:SetText("")
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
end

CloseDropDownMenus()
Expand Down Expand Up @@ -1125,9 +1125,9 @@ function CommDKP:ManageEntries()
CommDKP:ChangeTeamName(selectedTeamIndex, self:GetText())
-- if we are performing name change on currently selected team, change main team view dropdown Text
if tonumber(CommDKP:GetCurrentTeamIndex()) == selectedTeamIndex then
UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, self:SetText(""))
LibDD:UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, self:SetText(""))
end
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
selectedTeam = nil
selectedTeamIndex = nil
CloseDropDownMenus()
Expand Down Expand Up @@ -1198,10 +1198,10 @@ function CommDKP:ManageEntries()
CommDKP:ChangeTeamName(selectedTeamIndex, CommDKP.ConfigTab3.TeamNameInput:GetText())
-- if we are performing name change on currently selected team, change main team view dropdown Text
if tonumber(CommDKP:GetCurrentTeamIndex()) == selectedTeamIndex then
UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP.ConfigTab3.TeamNameInput:GetText())
LibDD:UIDropDownMenu_SetText(CommDKP.UIConfig.TeamViewChangerDropDown, CommDKP.ConfigTab3.TeamNameInput:GetText())
end
CommDKP.ConfigTab3.TeamNameInput:SetText("")
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
selectedTeam = nil
selectedTeamIndex = nil
CloseDropDownMenus()
Expand Down Expand Up @@ -1251,7 +1251,7 @@ function CommDKP:ManageEntries()
OnAccept = function()
CommDKP:AddNewTeamToGuild()
CommDKP.ConfigTab3.TeamNameInput:SetText("")
UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
LibDD:UIDropDownMenu_SetText(CommDKP.ConfigTab3.TeamListDropDown, L["TEAMSELECT"])
CloseDropDownMenus()
end,
timeout = 0,
Expand Down
Loading

0 comments on commit 3ef7bf9

Please sign in to comment.