- Embeding the custom display window into the new plugin window.

- Embeding the create aura panel into the new plugin window.
- Some localization added to Statistics and Create Aura panel.
This commit is contained in:
Tercio
2017-12-12 13:09:20 -02:00
parent 2b4aacd54d
commit 9a5e448a30
8 changed files with 138 additions and 91 deletions
+2
View File
@@ -525,6 +525,7 @@
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
backdropbordercolor = {0, 0, 0, 1},
onentercolor = {0.3, 0.3, 0.3, .5},
}
)
_detalhes.gump:InstallTemplate ("button", "DETAILS_PLUGINPANEL_BUTTONSELECTED_TEMPLATE",
@@ -532,6 +533,7 @@
backdrop = {edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true},
backdropcolor = {0, 0, 0, .5},
backdropbordercolor = {1, 1, 0, 1},
onentercolor = {0.3, 0.3, 0.3, .5},
}
)
+4 -1
View File
@@ -1172,7 +1172,7 @@
function _detalhes:InitializeRaidHistoryWindow()
local DetailsRaidHistoryWindow = CreateFrame ("frame", "DetailsRaidHistoryWindow", UIParent)
DetailsRaidHistoryWindow.Frame = DetailsRaidHistoryWindow
DetailsRaidHistoryWindow.__name = "Statistics"
DetailsRaidHistoryWindow.__name = Loc ["STRING_STATISTICS"]
DetailsRaidHistoryWindow.real_name = "DETAILS_STATISTICS"
DetailsRaidHistoryWindow.__icon = [[Interface\PvPRankBadges\PvPRank08]]
DetailsPluginContainerWindow.EmbedPlugin (DetailsRaidHistoryWindow, DetailsRaidHistoryWindow, true)
@@ -1289,6 +1289,8 @@
div:SetPoint ("topleft", f, "topleft", 180, -64)
div:SetHeight (574)
--gradient
--[=[
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
@@ -1304,6 +1306,7 @@
blackdiv:SetPoint ("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth (200)
--]=]
--select history or guild rank
local options_switch_template = _detalhes.gump:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
+60 -48
View File
@@ -1691,22 +1691,36 @@
end
-- other_values DBM:
-- text_size 72
-- dbm_timer_id Timer183254cd
-- text Next Allure of Flames In
-- spellid 183254
-- icon Interface\Icons\Spell_Fire_FelFlameStrike
-- other_values BW:
-- bw_timer_id 183828
-- text Next Death Brand In
-- icon Interface\Icons\warlock_summon_doomguard
-- text_size 72
function _detalhes:InitializeAuraCreationWindow()
local DetailsAuraPanel = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
DetailsAuraPanel.Frame = DetailsAuraPanel
DetailsAuraPanel.__name = L["STRING_CREATEAURA"]
DetailsAuraPanel.real_name = "DETAILS_CREATEAURA"
DetailsAuraPanel.__icon = [[Interface\BUTTONS\UI-GroupLoot-DE-Up]]
DetailsPluginContainerWindow.EmbedPlugin (DetailsAuraPanel, DetailsAuraPanel, true)
function DetailsAuraPanel.RefreshWindow()
_detalhes:OpenAuraPanel() --spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values
end
end
local empty_other_values = {}
function _detalhes:OpenAuraPanel (spellid, spellname, spellicon, encounterid, triggertype, auratype, other_values)
-- other_values DBM:
-- text_size 72
-- dbm_timer_id Timer183254cd
-- text Next Allure of Flames In
-- spellid 183254
-- icon Interface\Icons\Spell_Fire_FelFlameStrike
-- other_values BW:
-- bw_timer_id 183828
-- text Next Death Brand In
-- icon Interface\Icons\warlock_summon_doomguard
-- text_size 72
if (not spellname) then
spellname = select (1, GetSpellInfo (spellid))
end
@@ -1714,7 +1728,9 @@
wipe (empty_other_values)
other_values = other_values or empty_other_values
if (not DetailsAuraPanel) then
if (not DetailsAuraPanel or not DetailsAuraPanel.Initialized) then
DetailsAuraPanel.Initialized = true
--> check if there is a group for our auras
if (WeakAuras and WeakAurasSaved) then
@@ -1728,7 +1744,7 @@
end
end
local f = CreateFrame ("frame", "DetailsAuraPanel", UIParent)
local f = DetailsAuraPanel or CreateFrame ("frame", "DetailsAuraPanel", UIParent)
f:SetSize (800, 600)
f:SetPoint ("center", UIParent, "center", 0, 150)
f:SetFrameStrata ("DIALOG")
@@ -1736,10 +1752,6 @@
f:SetMovable (true)
f:SetToplevel (true)
--f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
--f:SetBackdropColor (24/255, 24/255, 24/255, .8)
--f:SetBackdropBorderColor (0, 0, 0, 1)
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.8)
@@ -2276,7 +2288,7 @@
f:Hide()
end
local create_button = fw:CreateButton (f, create_func, 106, 20, "Create Aura")
local create_button = fw:CreateButton (f, create_func, 106, 20, L["STRING_CREATEAURA"])
create_button:SetTemplate (slider_template)
local cancel_button = fw:CreateButton (f, function() name_textentry:ClearFocus(); f:Hide() end, 106, 20, "Cancel")
@@ -2462,6 +2474,8 @@
DetailsAuraPanel:UpdateLabels()
DetailsAuraPanel:Show()
DetailsPluginContainerWindow.OpenPlugin (DetailsAuraPanel)
end
------------------------------------------------------------------------------------------------------------------
@@ -2848,9 +2862,9 @@
--> forge
function _detalhes:InitializeForge()
local DetailsForgePanel = _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Details! Aura Forge", "DetailsForgePanel")
local DetailsForgePanel = _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
DetailsForgePanel.Frame = DetailsForgePanel
DetailsForgePanel.__name = "Aura Forge"
DetailsForgePanel.__name = L["STRING_SPELLLIST"]
DetailsForgePanel.real_name = "DETAILS_FORGE"
DetailsForgePanel.__icon = [[Interface\MINIMAP\Vehicle-HammerGold-3]]
DetailsPluginContainerWindow.EmbedPlugin (DetailsForgePanel, DetailsForgePanel, true)
@@ -2861,24 +2875,22 @@
end
function _detalhes:OpenForge()
if (not DetailsForgePanel or not DetailsForgePanel.Initialized) then
if (not DetailsForgePanel or not DetailsForgePanel.Initialized) then
local fw = _detalhes:GetFramework()
local lower = string.lower
DetailsForgePanel.Initialized = true
--main frame
local f = DetailsForgePanel or _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Details! Forge", "DetailsForgePanel")
local f = DetailsForgePanel or _detalhes.gump:CreateSimplePanel (UIParent, 960, 600, "Details! " .. L["STRING_SPELLLIST"], "DetailsForgePanel")
f:SetPoint ("center", UIParent, "center")
f:SetFrameStrata ("HIGH")
f:SetToplevel (true)
f:SetMovable (true)
f.Title:SetTextColor (1, .8, .2)
local have_plugins_enabled
for id, instanceTable in pairs (_detalhes.EncounterInformation) do
@@ -2948,12 +2960,30 @@
f.bg1:SetSize (790, 454)
f.bg1:SetAllPoints()
--f:SetBackdropColor (unpack (_detalhes.default_backdropcolor))
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .5)
f:SetBackdropBorderColor (0, 0, 0, 1)
--[=[
--scroll gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (1)
blackdiv:SetPoint ("topleft", f, "topleft", 170, -100)
blackdiv:SetHeight (461)
blackdiv:SetWidth (200)
--big gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (0.7)
blackdiv:SetPoint ("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth (200)
--]=]
local no_func = function()end
local nothing_to_show = {}
local current_module
@@ -3743,25 +3773,7 @@
--width = 160,
--height = 18,
})
--scroll gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (1)
blackdiv:SetPoint ("topleft", f, "topleft", 170, -100)
blackdiv:SetHeight (461)
blackdiv:SetWidth (200)
--big gradient
local blackdiv = f:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
blackdiv:SetAlpha (0.7)
blackdiv:SetPoint ("topleft", f, "topleft", 0, 0)
blackdiv:SetPoint ("bottomleft", f, "bottomleft", 0, 0)
blackdiv:SetWidth (200)
local select_module = function (a, b, module_number)
if (current_module ~= module_number) then
+65 -40
View File
@@ -79,16 +79,35 @@
_G.DetailsCustomPanel:Hide()
end
function _detalhes:InitializeCustomDisplayWindow()
local DetailsCustomPanel = CreateFrame ("frame", "DetailsCustomPanel", UIParent)
DetailsCustomPanel.Frame = DetailsCustomPanel
DetailsCustomPanel.__name = "Custom Display"
DetailsCustomPanel.real_name = "DETAILS_CUSTOMDISPLAY"
DetailsCustomPanel.__icon = [[Interface\FriendsFrame\UI-FriendsList-Small-Up]]
DetailsPluginContainerWindow.EmbedPlugin (DetailsCustomPanel, DetailsCustomPanel, true)
function DetailsCustomPanel.RefreshWindow()
_detalhes:OpenCustomDisplayWindow()
end
end
function _detalhes:OpenCustomDisplayWindow()
if (not _G.DetailsCustomPanel) then
if (not _G.DetailsCustomPanel or not DetailsCustomPanel.Initialized) then
DetailsPluginContainerWindow.OpenPlugin (DetailsCustomPanel)
local GameCooltip = GameCooltip
DetailsCustomPanel.Initialized = true
--> main frame
local custom_window = _CreateFrame ("frame", "DetailsCustomPanel", UIParent)
local custom_window = DetailsCustomPanel or _CreateFrame ("frame", "DetailsCustomPanel", UIParent)
local f = custom_window
custom_window:SetPoint ("center", UIParent, "center")
custom_window:SetSize (850, 370)
custom_window:SetSize (850, 500)
custom_window:EnableMouse (true)
custom_window:SetMovable (true)
custom_window:SetScript ("OnMouseDown", function (self, button)
@@ -114,17 +133,49 @@
end)
tinsert (UISpecialFrames, "DetailsCustomPanel")
--> background texture
custom_window.background = custom_window:CreateTexture (nil, "border")
custom_window.background:SetTexture ([[Interface\AddOns\Details\images\custom_bg]])
custom_window.background:SetPoint ("topleft", custom_window, "topleft")
--custom_window.background:Hide()
local bigdog = gump:NewImage (custom_window, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.7, 200*0.7, "overlay", {0, 1, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog")
bigdog:SetPoint ("bottomleft", custom_window, "bottomleft", 15, 9)
bigdog:SetAlpha (0.5)
--> menu title bar
local titlebar = CreateFrame ("frame", nil, f)
titlebar:SetPoint ("topleft", f, "topleft", 2, -3)
titlebar:SetPoint ("topright", f, "topright", -2, -3)
titlebar:SetHeight (20)
titlebar:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
titlebar:SetBackdropColor (.5, .5, .5, 1)
titlebar:SetBackdropBorderColor (0, 0, 0, 1)
--> menu title
local titleLabel = _detalhes.gump:NewLabel (titlebar, titlebar, nil, "titulo", "Details! Custom Displays", "GameFontNormal", 12)
titleLabel:SetPoint ("center", titlebar , "center")
titleLabel:SetPoint ("top", titlebar , "top", 0, -4)
--> close button
f.Close = CreateFrame ("button", "$parentCloseButton", f)
f.Close:SetPoint ("right", titlebar, "right", -2, 0)
f.Close:SetSize (16, 16)
f.Close:SetNormalTexture (_detalhes.gump.folder .. "icons")
f.Close:SetHighlightTexture (_detalhes.gump.folder .. "icons")
f.Close:SetPushedTexture (_detalhes.gump.folder .. "icons")
f.Close:GetNormalTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetHighlightTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:GetPushedTexture():SetTexCoord (0, 16/128, 0, 1)
f.Close:SetAlpha (0.7)
f.Close:SetScript ("OnClick", function() f:Hide() end)
--> background
f.bg1 = f:CreateTexture (nil, "background")
f.bg1:SetTexture ([[Interface\AddOns\Details\images\background]], true)
f.bg1:SetAlpha (0.7)
f.bg1:SetVertexColor (0.27, 0.27, 0.27)
f.bg1:SetVertTile (true)
f.bg1:SetHorizTile (true)
f.bg1:SetAllPoints()
f:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\AddOns\Details\images\background]], tileSize = 64, tile = true})
f:SetBackdropColor (.5, .5, .5, .5)
f:SetBackdropBorderColor (0, 0, 0, 1)
--> close button
custom_window.close = _CreateFrame ("button", nil, custom_window, "UIPanelCloseButton")
custom_window.close:SetSize (32, 32)
@@ -136,35 +187,9 @@
custom_window.close:SetScript ("OnHide", function()
_detalhes:CloseCustomDisplayWindow()
end)
--> title
custom_window.title = gump:NewLabel (custom_window, nil, nil, nil, "Custom Display", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255})
custom_window.title:SetPoint ("center", custom_window, "center")
custom_window.title:SetPoint ("top", custom_window, "top", 0, -18)
--> icon
custom_window.icon = custom_window:CreateTexture (nil, "background")
custom_window.icon:SetPoint ("topleft", custom_window, "topleft", 4, 0)
custom_window.icon:SetSize (64, 64)
custom_window.icon:SetDrawLayer ("background", 2)
custom_window.icon:SetTexture ([[Interface\AddOns\Details\images\classes_plus]])
custom_window.icon:SetTexCoord (0, 0.25, 0.25, 0.5)
--> menu background
custom_window.menubackground = custom_window:CreateTexture (nil, "background")
custom_window.menubackground:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
custom_window.menubackground:SetPoint ("topleft", custom_window, "topleft", 19, -34)
custom_window.menubackground:SetSize (151, 326)
custom_window.menubackground:SetDrawLayer ("background", 1)
custom_window.menubackground:SetAlpha (0.75)
--> select panel background
custom_window.selectbackground = custom_window:CreateTexture (nil, "background")
custom_window.selectbackground:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]])
custom_window.selectbackground:SetPoint ("topleft", custom_window, "topleft", 175, -36)
custom_window.selectbackground:SetSize (666, 324)
custom_window.selectbackground:SetDrawLayer ("background", 1)
custom_window.selectbackground:SetAlpha (0.75)
DetailsCustomPanel.BoxType = 1
DetailsCustomPanel.IsEditing = false
+3
View File
@@ -845,6 +845,8 @@ local menus2 = {
return true
end
--[=[
--> gradient
local blackdiv = window:CreateTexture (nil, "artwork")
blackdiv:SetTexture ([[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]])
blackdiv:SetVertexColor (0, 0, 0)
@@ -852,6 +854,7 @@ local menus2 = {
blackdiv:SetPoint ("topleft", window.frame, "topleft", 0, 0)
blackdiv:SetPoint ("bottomleft", window.frame, "bottomleft", 0, 0)
blackdiv:SetWidth (200)
--]=]
--move buttons creation to loading process
function window:create_left_menu()
+2 -2
View File
@@ -5822,12 +5822,12 @@ local build_mode_list = function (self, elapsed)
GameCooltip:AddLine ("$div")
--> forge and history buttons
CoolTip:AddLine (Loc ["STRING_MODE_OPENFORGE"])
CoolTip:AddLine (Loc ["STRING_SPELLLIST"])
CoolTip:AddMenu (1, _detalhes.OpenForge)
CoolTip:AddIcon ([[Interface\MINIMAP\Vehicle-HammerGold-3]], 1, 1, 16, 16, 0, 1, 0, 1)
--> statistics
CoolTip:AddLine ("Statistics") --curse localization isn't adding new strings (and I deleted the old one)
CoolTip:AddLine (Loc ["STRING_STATISTICS"])
CoolTip:AddMenu (1, _detalhes.OpenRaidHistoryWindow)
CoolTip:AddIcon ([[Interface\PvPRankBadges\PvPRank08]], 1, 1, 16, 16, 0, 1, 0, 1)
Binary file not shown.
+2
View File
@@ -81,6 +81,8 @@ function _G._detalhes:Start()
self:InitializeForge() --to install into the container plugin
self:InitializeRaidHistoryWindow()
self:InitializeOptionsWindow()
self:InitializeAuraCreationWindow()
self:InitializeCustomDisplayWindow()
--> bookmarks
if (self.switch.InitSwitch) then