- If the skin selected does not exists, use the default skin.

- Added 'icon_offset' member into instances to offset the class icon.
- Event Tracker not uses the cooldown and crowd control lists from the framework.
- Added new gradient wallpapers.
This commit is contained in:
Tercioo
2019-04-03 15:08:37 -03:00
parent 1523f179f8
commit 4bd7bbc6df
10 changed files with 423 additions and 32 deletions
+25 -3
View File
@@ -9029,6 +9029,18 @@ function window:CreateFrame9()
local onSelectSecTexture = function (self, instance, texturePath)
local textureOptions = window.WallpaperTextureOptions
local selectedTextureOption
for textureBracket, textureTables in pairs (textureOptions) do
for i = 1, #textureTables do
local textureTable = textureTables [i]
if (textureTable.value == texturePath) then
selectedTextureOption = textureTable
break
end
end
end
if (texturePath:find ("TALENTFRAME")) then
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 0.703125}, nil, nil, {1, 1, 1, 1})
@@ -9076,13 +9088,13 @@ function window:CreateFrame9()
end
else
instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
local texCoords = selectedTextureOption and selectedTextureOption.texcoord
instance:InstanceWallpaper (texturePath, nil, nil, texCoords or {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
if (_detalhes.options_group_edit and not DetailsOptionsWindow.loading_settings) then
for _, this_instance in ipairs (instance:GetInstanceGroup()) do
if (this_instance ~= instance) then
this_instance:InstanceWallpaper (texturePath, nil, nil, {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
this_instance:InstanceWallpaper (texturePath, nil, nil, texCoords or {0, 1, 0, 1}, nil, nil, {1, 1, 1, 1})
end
end
end
@@ -9105,6 +9117,13 @@ function window:CreateFrame9()
local subMenu = {
["DESIGN"] = {
{value = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]], label = "Horizontal Gradient", onclick = onSelectSecTexture, icon = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]], texcoord = nil},
{value = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Highlight]], label = "Golden Highlight", onclick = onSelectSecTexture, icon = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Parchment-Highlight]], texcoord = {0.35, 0.655, 0.0390625, 0.859375}},
{value = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Stat-Buttons]], label = "Gray Gradient", onclick = onSelectSecTexture, icon = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Stat-Buttons]], texcoord = {0, 1, 97/128, 1}},
{value = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Borders]], label = "Orange Gradient", onclick = onSelectSecTexture, icon = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-Borders]], texcoord = {160/512, 345/512, 80/256, 130/256}},
},
["ARCHEOLOGY"] = {
{value = [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]], label = "Book Wallpaper", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-BookCompletedLeft]], texcoord = nil},
{value = [[Interface\ARCHEOLOGY\Arch-BookItemLeft]], label = "Book Wallpaper 2", onclick = onSelectSecTexture, icon = [[Interface\ARCHEOLOGY\Arch-BookItemLeft]], texcoord = nil},
@@ -9283,6 +9302,8 @@ function window:CreateFrame9()
{value = [[Interface\TALENTFRAME\bg-warrior-protection]], label = "Protection", onclick = onSelectSecTexture, icon = [[Interface\ICONS\ability_warrior_defensivestance]], texcoord = nil}
},
}
window.WallpaperTextureOptions = subMenu
local buildBackgroundMenu2 = function()
return subMenu [frame9.backgroundDropdown.value] or {label = "", value = 0}
@@ -9294,6 +9315,7 @@ function window:CreateFrame9()
end
local backgroundTable = {
{value = "DESIGN", label = "Design", onclick = onSelectMainTexture, icon = [[Interface\ACHIEVEMENTFRAME\UI-Achievement-HorizontalShadow]]},
{value = "ARCHEOLOGY", label = "Archeology", onclick = onSelectMainTexture, icon = [[Interface\ARCHEOLOGY\Arch-Icon-Marker]]},
{value = "CREDITS", label = "Burning Crusade", onclick = onSelectMainTexture, icon = [[Interface\ICONS\TEMP]]},
{value = "LOGOS", label = "Logos", onclick = onSelectMainTexture, icon = [[Interface\WorldStateFrame\ColumnIcon-FlagCapture0]]},
+17 -4
View File
@@ -2411,12 +2411,16 @@ local icon_frame_create_animation = function()
end
local icon_frame_on_click_down = function (self)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", 1, -1)
local instanceID = self.instance_id
local instanceObject = Details:GetInstance (instanceID)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", instanceObject.row_info.icon_offset[1] + 1, instanceObject.row_info.icon_offset[2] + -1)
end
local icon_frame_on_click_up = function (self, button)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left")
local instanceID = self.instance_id
local instanceObject = Details:GetInstance (instanceID)
self:GetParent():GetParent().icone_classe:SetPoint ("left", self:GetParent():GetParent(), "left", instanceObject.row_info.icon_offset[1], instanceObject.row_info.icon_offset[2])
if (button == "LeftButton") then
--> open the rank panel
@@ -4085,6 +4089,7 @@ function gump:CriaNovaBarra (instancia, index)
icon_frame:SetPoint ("topleft", icone_classe, "topleft")
icon_frame:SetPoint ("bottomright", icone_classe, "bottomright")
icon_frame:SetFrameLevel (new_row.statusbar:GetFrameLevel()+1)
icon_frame.instance_id = instancia.meu_id
icon_frame.row = new_row
new_row.icon_frame = icon_frame
@@ -4603,6 +4608,8 @@ function _detalhes:InstanceRefreshRows (instancia)
end
local icon_force_grayscale = self.row_info.icon_grayscale
local icon_offset_x, icon_offset_y = unpack (self.row_info.icon_offset)
--custom right text
local custom_right_text_enabled = self.row_info.textR_enable_custom_text
@@ -4663,7 +4670,7 @@ function _detalhes:InstanceRefreshRows (instancia)
row.icone_classe:Hide()
else
row.icone_classe:ClearAllPoints()
row.icone_classe:SetPoint ("left", row, "left")
row.icone_classe:SetPoint ("left", row, "left", icon_offset_x, icon_offset_y)
row.icone_classe:Show()
if (start_after_icon) then
@@ -4695,7 +4702,7 @@ function _detalhes:InstanceRefreshRows (instancia)
else
row.icone_classe:ClearAllPoints()
row.icone_classe:SetPoint ("right", row, "right")
row.icone_classe:SetPoint ("right", row, "right", icon_offset_x, icon_offset_y)
row.icone_classe:Show()
if (start_after_icon) then
@@ -5167,6 +5174,12 @@ function _detalhes:InstanceColor (red, green, blue, alpha, no_save, change_statu
-- print (self.skin, self.meu_id)
local skin = _detalhes.skins [self.skin]
if (not skin) then --the skin isn't available any more
Details:Msg ("Skin " .. (self.skin or "?") .. " not found, changing to 'Minimalistic'.")
Details:Msg ("Recommended to change the skin in the option panel > Skin Selection.")
skin = _detalhes.skins ["Minimalistic"]
self.skin = "Minimalistic"
end
--[[
self.baseframe.rodape.esquerdo:SetVertexColor (red, green, blue)