Commit 17525cce authored by Azilroka's avatar Azilroka

QS, RR, EC

parent 22a55109
......@@ -232,9 +232,9 @@ lib.VCFrame = CreateFrame('Frame')
lib.VCFrame:SetScript('OnEvent', lib.VersionCheck)
lib.VCFrame:SetScript("OnUpdate", function(self, elapsed)
self.delayed = (self.delayed or 0) + elapsed
if self.delayed > 10 then
if self.delayed > 25 then
local numActiveChannels = C_ChatInfo.GetNumActiveChannels()
if numActiveChannels and (numActiveChannels >= 10) then
if numActiveChannels and (numActiveChannels >= 1) then
if (GetChannelName('ElvUIGVC') == 0) and (numActiveChannels < MAX_WOW_CHAT_CHANNELS) then
JoinChannelByName('ElvUIGVC', nil, nil, true)
......@@ -245,7 +245,7 @@ lib.VCFrame:SetScript("OnUpdate", function(self, elapsed)
self:SetScript("OnUpdate", nil)
end
end
elseif self.delayed > 30 then
elseif self.delayed > 45 then
self:SetScript("OnUpdate", nil)
end
end)
......
......@@ -20,6 +20,24 @@ function PA:TukuiOptions()
get = function() return TukuiConfigPerAccount end,
set = function(_, value) TukuiConfigPerAccount = value end,
},
Config = {
order = 0,
type = 'execute',
name = 'Open Tukui Config',
func = function()
PA.ACD:Close('Enhanced_Config')
GameTooltip:Hide()
if (not TukuiConfigFrame) then
TukuiConfig:CreateConfigWindow()
end
if TukuiConfigFrame:IsVisible() then
TukuiConfigFrame:Hide()
else
TukuiConfigFrame:Show()
end
end,
},
},
},
},
......
local PA = _G.ProjectAzilroka
if PA.ElvUI then return end
if PA.Tukui then
Tukui[1].Miscellaneous.GameMenu.EnableTukuiConfig = function() end
end
local EC = PA:NewModule("EnhancedConfig", 'AceConsole-3.0', 'AceEvent-3.0')
PA.EC, _G.Enhanced_Config = EC, EC
......@@ -42,33 +46,49 @@ EC.Options = {
},
}
function EC:Initialize()
function EC.OnConfigClosed(widget, event)
PA.ACD.OpenFrames['Enhanced_Config'] = nil
PA.GUI:Release(widget)
function EC:PositionGameMenuButton()
GameMenuFrame:SetHeight(GameMenuFrame:GetHeight() + GameMenuButtonLogout:GetHeight() - 4)
local _, relTo, _, _, offY = GameMenuButtonLogout:GetPoint()
if relTo ~= GameMenuFrame['EC'] then
GameMenuFrame['EC']:ClearAllPoints()
GameMenuFrame['EC']:Point("TOPLEFT", relTo, "BOTTOMLEFT", 0, -1)
GameMenuButtonLogout:ClearAllPoints()
GameMenuButtonLogout:Point("TOPLEFT", GameMenuFrame['EC'], "BOTTOMLEFT", 0, offY)
end
end
function EC.OnConfigClosed(widget, event)
PA.ACD.OpenFrames['Enhanced_Config'] = nil
PA.GUI:Release(widget)
end
function EC:ToggleConfig()
if not PA.ACD.OpenFrames['Enhanced_Config'] then
local Container = PA.GUI:Create('Frame')
if PA.AS then
PA.AS:CreateShadow(Container.frame)
end
PA.ACD.OpenFrames['Enhanced_Config'] = Container
Container:SetCallback('OnClose', EC.OnConfigClosed)
PA.ACD:Open('Enhanced_Config', Container)
function EC:ToggleConfig()
if not PA.ACD.OpenFrames['Enhanced_Config'] then
local Container = PA.GUI:Create('Frame')
if PA.AS then
PA.AS:CreateShadow(Container.frame)
end
GameTooltip:Hide()
PA.ACD.OpenFrames['Enhanced_Config'] = Container
Container:SetCallback('OnClose', EC.OnConfigClosed)
PA.ACD:Open('Enhanced_Config', Container)
end
GameTooltip:Hide()
end
local ConfigButton = CreateFrame('Button', 'Enhanced_ConfigButton', GameMenuFrame, 'GameMenuButtonTemplate')
ConfigButton:SetSize(GameMenuButtonUIOptions:GetWidth(), GameMenuButtonUIOptions:GetHeight())
ConfigButton:SetPoint('TOP', GameMenuButtonUIOptions, 'BOTTOM', 0 , -1)
ConfigButton:SetText(EC.Title)
ConfigButton:SetScript('OnClick', function() EC:ToggleConfig() HideUIPanel(GameMenuFrame) end)
GameMenuFrame:HookScript('OnShow', function(self) self:SetHeight(self:GetHeight() + GameMenuButtonUIOptions:GetHeight()) end)
GameMenuButtonKeybindings:ClearAllPoints()
GameMenuButtonKeybindings:SetPoint("TOP", ConfigButton, "BOTTOM", 0, -1)
function EC:Initialize()
local GameMenuButton = CreateFrame("Button", nil, GameMenuFrame, "GameMenuButtonTemplate")
GameMenuButton:SetText(EC.Title)
GameMenuButton:SetScript("OnClick", function()
EC:ToggleConfig()
HideUIPanel(GameMenuFrame)
end)
GameMenuFrame['EC'] = GameMenuButton
if not IsAddOnLoaded("ConsolePortUI_Menu") then -- #390
GameMenuButton:Size(GameMenuButtonLogout:GetWidth(), GameMenuButtonLogout:GetHeight())
GameMenuButton:Point("TOPLEFT", GameMenuButtonAddons, "BOTTOMLEFT", 0, -1)
hooksecurefunc('GameMenuFrame_UpdateVisibleButtons', self.PositionGameMenuButton)
end
PA.AC:RegisterOptionsTable('Enhanced_Config', EC.Options)
PA.ACD:SetDefaultSize('Enhanced_Config', 1200, 800)
......
......@@ -54,7 +54,10 @@ function QS:CheckQuest()
return
end
--local _, _, _, _, _, complete, daily, id = GetQuestLogTitle(index)
QS.ObjectivesCompleted, QS.ObjectivesTotal = QS:CountCompletedObjectives(QS.QuestIndex)
if QS.ObjectivesCompleted == QS.ObjectivesTotal then
QS:ResetSoundPlayback()
if QS.db.UseSoundID then
......@@ -82,7 +85,7 @@ function QS:UNIT_QUEST_LOG_CHANGED(_, unit)
return
end
QS:ScheduleTimer(function() QS:CheckQuest() end, .5)
QS:ScheduleTimer('CheckQuest', 1)
end
function QS:QUEST_WATCH_UPDATE(_, index)
......
......@@ -136,7 +136,7 @@ function RR:Show()
local index
local baseIndex = totalRewards or 0
local buttonIndex = baseIndex
local buttonIndex = numQuestChoices == 1 and 1 or baseIndex
wipe(RR.ReputationInfo)
......@@ -181,6 +181,7 @@ function RR:Show()
questItem.Icon:SetTexture(PA.MyFaction and (PA.MyFaction == 'Neutral' and [[Interface\Icons\Achievement_Character_Pandaren_Female]] or ([[Interface\Icons\PVPCurrency-Conquest-%s]]):format(PA.MyFaction)))
--questItem.Icon:SetTexture(([[Interface\Icons\Achievement_Reputation_0%d]]):format(Info.Standing or 1))
questItem.Count:SetText(Info.Base + Info.Bonus)
questItem.Count:Show()
if PA.AddOnSkins and questItem.Icon.Backdrop then
questItem.Icon.Backdrop:SetBackdropBorderColor(unpack(AS.BorderColor))
......@@ -212,6 +213,8 @@ function RR:Show()
end
end
-- QuestInfoFrame.rewardsFrame.ItemReceiveText:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", 0, -5);
QuestInfoFrame.rewardsFrame:Show()
QuestInfoFrame.rewardsFrame:SetHeight(Height)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment