- Added Shaman's Ancestral Guidance on cooldowns list.

- Added a profile selection screen when Details! are running for the first time on a character.
- Added Menu Text Size option over miscellaneous section on options panel.
This commit is contained in:
tercio
2014-08-08 17:24:44 -03:00
parent 3c3d840b65
commit 688fb10a7b
8 changed files with 166 additions and 59 deletions
+6 -3
View File
File diff suppressed because one or more lines are too long
+99
View File
@@ -1359,6 +1359,105 @@
end
function _detalhes:OpenProfiler()
--> isn't first run, so just quit
if (not _detalhes.character_first_run) then
return
elseif (_detalhes.is_first_run) then
return
else
--> check is this is the first run of the addon (after being installed)
local amount = 0
for name, profile in pairs (_detalhes_global.__profiles) do
amount = amount + 1
end
if (amount == 1) then
return
end
end
local f = CreateFrame ("frame", nil, UIParent) --"DetailsSelectProfile"
f:SetSize (250, 300)
f:SetPoint ("right", UIParent, "right", -5, 0)
f:SetMovable (true)
f:SetScript ("OnMouseDown", function (self)
if (not self.moving) then
self:StartMoving()
self.moving = true
end
end)
f:SetScript ("OnMouseUp", function (self)
if (self.moving) then
self:StopMovingOrSizing()
self.moving = false
end
end)
local background = f:CreateTexture (nil, "background")
background:SetAllPoints()
background:SetTexture ([[Interface\AddOns\Details\images\welcome]])
local logo = f:CreateTexture (nil, "artwork")
logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]])
logo:SetSize (256*0.8, 128*0.8)
logo:SetPoint ("center", f, "center", 0, 0)
logo:SetPoint ("top", f, "top", 20, 20)
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
string_profiler:SetPoint ("top", logo, "bottom", -20, 10)
string_profiler:SetText ("Profiler!")
local string_profiler = f:CreateFontString (nil, "artwork", "GameFontNormal")
string_profiler:SetPoint ("topleft", f, "topleft", 10, -130)
string_profiler:SetText (Loc ["STRING_OPTIONS_PROFILE_SELECTEXISTING"])
string_profiler:SetWidth (230)
_detalhes:SetFontSize (string_profiler, 11)
_detalhes:SetFontColor (string_profiler, "white")
--> get the new profile name
local current_profile = _detalhes:GetCurrentProfileName()
local on_select_profile = function (_, _, profilename)
if (profilename ~= _detalhes:GetCurrentProfileName()) then
_detalhes:ApplyProfile (profilename)
if (_G.DetailsOptionsWindow and _G.DetailsOptionsWindow:IsShown()) then
_detalhes:OpenOptionsWindow (_G.DetailsOptionsWindow.instance)
end
end
end
local texcoord = {5/32, 30/32, 4/32, 28/32}
local fill_dropdown = function()
local t = {
{value = current_profile, label = Loc ["STRING_OPTIONS_PROFILE_USENEW"], onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendRequestIcon]], texcoord = {4/32, 30/32, 4/32, 28/32}, iconcolor = "orange"}
}
for _, profilename in ipairs (_detalhes:GetProfileList()) do
if (profilename ~= current_profile) then
t[#t+1] = {value = profilename, label = profilename, onclick = on_select_profile, icon = [[Interface\FriendsFrame\UI-Toast-FriendOnlineIcon]], texcoord = texcoord, iconcolor = "yellow"}
end
end
return t
end
local dropdown = _detalhes.gump:NewDropDown (f, f, "DetailsProfilerProfileSelectorDropdown", "dropdown", 220, 20, fill_dropdown, 1)
dropdown:SetPoint (15, -190)
local confirm_func = function()
if (current_profile ~= _detalhes:GetCurrentProfileName()) then
_detalhes:EraseProfile (current_profile)
end
f:Hide()
end
local confirm = _detalhes.gump:NewButton (f, f, "DetailsProfilerProfileConfirmButton", "button", 150, 20, confirm_func, nil, nil, nil, "okey!")
confirm:SetPoint (50, -250)
confirm:InstallCustomTexture()
end
--> minimap icon and hotcorner
function _detalhes:RegisterMinimapAndHotCorner()
local LDB = LibStub ("LibDataBroker-1.1", true)
+10 -2
View File
@@ -421,7 +421,11 @@ function DropDownMetaFunctions:Selected (_table)
end
if (_table.iconcolor) then
self.icon:SetVertexColor (unpack (_table.iconcolor))
if (type (_table.iconcolor) == "string") then
self.icon:SetVertexColor (gump:ParseColors (_table.iconcolor))
else
self.icon:SetVertexColor (unpack (_table.iconcolor))
end
else
self.icon:SetVertexColor (1, 1, 1, 1)
end
@@ -593,7 +597,11 @@ function DetailsDropDownOnMouseDown (button)
end
if (_table.iconcolor) then
_this_row.icon:SetVertexColor (unpack (_table.iconcolor))
if (type (_table.iconcolor) == "string") then
_this_row.icon:SetVertexColor (gump:ParseColors (_table.iconcolor))
else
_this_row.icon:SetVertexColor (unpack (_table.iconcolor))
end
else
_this_row.icon:SetVertexColor (1, 1, 1, 1)
end
+2 -1
View File
@@ -292,8 +292,9 @@ function _detalhes:LoadConfig()
end
--> profile
--> fix for the 500
--> character first run
if (_detalhes_database.active_profile == "") then
_detalhes.character_first_run = true
--> é a primeira vez que este character usa profiles, precisa copiar as keys existentes
local current_profile_name = _detalhes:GetCurrentProfileName()
_detalhes:GetProfile (current_profile_name, true)
+1 -1
View File
@@ -1007,6 +1007,7 @@ do
[108270] = {60, 5, 1}, -- Stone Bulwark Totem
[108280] = {180, 12}, -- Healing Tide Totem
[98008] = {180, 6}, -- Spirit Link Totem
[108281] = {120, 10}, -- Ancestral Guidance
--["WARLOCK"] = {108416, 6229},
[108416] = {60, 20, 1}, -- Sacrificial Pact 1 = self
@@ -1748,7 +1749,6 @@ do
[2825] = true, -- Bloodlust
[114049] = true, -- Ascendance
[16166] = true, -- Elemental Mastery
[108281] = true, -- Ancestral Guidance
[51533] = true, -- Feral Spirit
[16188] = true, -- Ancestral Swiftness
[2062] = true, -- Earth Elemental Totem
+28 -9
View File
@@ -1029,7 +1029,7 @@ function window:CreateFrame20()
-- text size
g:NewLabel (frame20, _, "$parentTooltipTextSizeLabel", "TooltipTextSizeLabel", Loc ["STRING_OPTIONS_TOOLTIPS_FONTSIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 25, 1, tonumber (_detalhes.tooltip.fontsize))
local s = g:NewSlider (frame20, _, "$parentTooltipTextSizeSlider", "TooltipTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (_detalhes.tooltip.fontsize))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -1966,6 +1966,21 @@ function window:CreateFrame18()
--local confirm_button = g:NewButton (frame18, nil, "$parentDeleteInstanceButton", "deleteInstanceButton", 60, 20, delete_instance, nil, nil, nil, "delete")
--confirm_button:InstallCustomTexture()
--> menu text size
g:NewLabel (frame18, _, "$parentMenuTextSizeLabel", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame18, _, "$parentMenuTextSizeSlider", "MenuTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, _detalhes.font_sizes.menus)
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
frame18.MenuTextSizeSlider:SetPoint ("left", frame18.MenuTextSizeLabel, "right", 2)
frame18.MenuTextSizeSlider:SetHook ("OnValueChange", function (_, _, amount)
_detalhes.font_sizes.menus = amount
end)
window:CreateLineBackground2 (frame18, "MenuTextSizeSlider", "MenuTextSizeLabel", Loc ["STRING_OPTIONS_MENU_FONT_SIZE_DESC"])
--> Report
g:NewLabel (frame18, _, "$parentReportHelpfulLinkLabel", "ReportHelpfulLinkLabel", Loc ["STRING_OPTIONS_REPORT_HEALLINKS"], "GameFontHighlightLeft")
@@ -2015,11 +2030,13 @@ function window:CreateFrame18()
{"instancesMiscLabel", 1, true},
{"deleteInstanceLabel", 2},
{"totalBarAnchorLabel", 3, true},
{"totalBarIconLabel", 4},
{"totalBarPickColorLabel", 5},
{"totalBarLabel", 6},
{"totalBarOnlyInGroupLabel", 7},
{"totalBarAnchorLabel", 4, true},
{"totalBarIconLabel", 5},
{"totalBarPickColorLabel", 6},
{"totalBarLabel", 7},
{"totalBarOnlyInGroupLabel", 8},
{"MenuTextSizeLabel", 3}
}
window:arrange_menu (frame18, right_side, window.right_start_at, -90)
@@ -2938,7 +2955,7 @@ function window:CreateFrame14()
--size
g:NewLabel (frame14, _, "$parentAttributeTextSizeLabel", "attributeTextSizeLabel", Loc ["STRING_OPTIONS_MENU_ATTRIBUTE_TEXTSIZE"], "GameFontHighlightLeft")
local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, 20, 8, 25, 1, tonumber ( instance.attribute_text.text_size))
local s = g:NewSlider (frame14, _, "$parentAttributeTextSizeSlider", "attributeTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber ( instance.attribute_text.text_size))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -4711,7 +4728,7 @@ function window:CreateFrame5()
window:CreateLineBackground2 (frame5, "fixedTextColor", "fixedTextColorLabel", Loc ["STRING_OPTIONS_TEXT_FIXEDCOLOR_DESC"])
--> text size
local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.row_info.font_size))
local s = g:NewSlider (frame5, _, "$parentSliderFontSize", "fonsizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.row_info.font_size))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -5715,7 +5732,7 @@ function window:CreateFrame8()
--> instance button
--text size
local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 15, 1, tonumber (instance.instancebutton_config.textsize))
local s = g:NewSlider (frame8, _, "$parentInstanceTextSizeSlider", "instanceTextSizeSlider", SLIDER_WIDTH, 20, 8, 32, 1, tonumber (instance.instancebutton_config.textsize))
s:SetBackdrop (slider_backdrop)
s:SetBackdropColor (unpack (slider_backdrop_color))
s:SetThumbSize (50)
@@ -7657,6 +7674,8 @@ function window:update_all (editing_instance)
_G.DetailsOptionsWindow18TotalBarOnlyInGroupSlider.MyObject:SetValue (editing_instance.total_bar.only_in_group)
_G.DetailsOptionsWindow18TotalBarIconTexture.MyObject:SetTexture (editing_instance.total_bar.icon)
_G.DetailsOptionsWindow18MenuTextSizeSlider.MyObject:SetValue (_detalhes.font_sizes.menus)
--> window 19
_G.DetailsOptionsWindow19MinimapSlider.MyObject:SetValue (not _detalhes.minimap.hide)
_G.DetailsOptionsWindow19MinimapActionDropdown.MyObject:Select (_detalhes.minimap.onclick_what_todo)
+19 -16
View File
@@ -1195,13 +1195,14 @@ local function resize_scripts (resizer, instancia, scrollbar, side, baseframe)
self.texture:SetBlendMode ("ADD")
self.mostrando = true
_G.GameCooltip:Reset()
_G.GameCooltip:SetType ("tooltip")
_G.GameCooltip:AddFromTable (resizeTooltip)
_G.GameCooltip:SetOption ("NoLastSelectedBar", true)
_G.GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
_G.GameCooltip:SetOwner (resizer)
_G.GameCooltip:ShowCooltip()
GameCooltip:Reset()
GameCooltip:SetType ("tooltip")
GameCooltip:AddFromTable (resizeTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetOwner (resizer)
GameCooltip:ShowCooltip()
end
end)
@@ -1217,7 +1218,7 @@ local function resize_scripts (resizer, instancia, scrollbar, side, baseframe)
self.texture:SetBlendMode ("BLEND")
self.mostrando = false
_G.GameCooltip:ShowMe (false)
GameCooltip:ShowMe (false)
end
end)
end
@@ -1239,6 +1240,7 @@ local lockFunctionOnEnter = function (self)
GameCooltip:SetType ("tooltip")
GameCooltip:AddFromTable (lockButtonTooltip)
GameCooltip:SetOption ("NoLastSelectedBar", true)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:SetOwner (self)
GameCooltip:ShowCooltip()
@@ -1251,7 +1253,7 @@ local lockFunctionOnLeave = function (self)
OnLeaveMainWindow (self.instancia, self)
self.label:SetTextColor (.3, .3, .3, .6)
self.mostrando = false
_G.GameCooltip:ShowMe (false)
GameCooltip:ShowMe (false)
end
end
@@ -1321,6 +1323,7 @@ local unSnapButtonOnEnter = function (self)
GameCooltip:Reset()
GameCooltip:AddFromTable (unSnapButtonTooltip)
GameCooltip:SetOption ("TextSize", _detalhes.font_sizes.menus)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
GameCooltip:ShowCooltip (self, "tooltip")
@@ -5686,11 +5689,11 @@ end
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, 10, font)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, 10, font)
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA_OVERALL"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "orange")
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar_overall)
@@ -5754,14 +5757,14 @@ end
GameCooltip:SetOption ("FixedWidthSub", 180)
local font = SharedMedia:Fetch ("font", "Friz Quadrata TT")
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, 10, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE"], nil, 1, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], 1, 1, 14, 14, 0.2, 0.8, 0.2, 0.8)
GameCooltip:AddMenu (1, close_button_onclick, self)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, 10, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddIcon ([[Interface\CHATFRAME\UI-ChatIcon-Minimize-Up]], 2, 1, 18, 18)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, 10, font)
GameCooltip:AddLine (Loc ["STRING_MENU_CLOSE_INSTANCE_DESC2"], nil, 2, "white", nil, _detalhes.font_sizes.menus, font)
GameCooltip:AddIcon ([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]], 2, 1, 18, 18)
GameCooltip:SetWallpaper (1, [[Interface\SPELLBOOK\Spellbook-Page-1]], {.6, 0.1, 0, 0.64453125}, {1, 1, 1, 0.1}, true)
@@ -6225,7 +6228,7 @@ function gump:CriaCabecalho (baseframe, instancia)
GameCooltip:SetOption ("TextHeightMod", 0)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, 10, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
GameCooltip:AddLine ("Report Results", nil, 1, "white", nil, _detalhes.font_sizes.menus, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
GameCooltip:AddIcon ([[Interface\Addons\Details\Images\report_button]], 1, 1, 12, 19)
GameCooltip:AddMenu (1, _detalhes.Reportar, instancia)
@@ -6350,7 +6353,7 @@ function gump:CriaCabecalho (baseframe, instancia)
end
end
CoolTip:SetOption ("TextSize", _detalhes.font_sizes.menus)
end
end
+1 -27
View File
@@ -425,33 +425,7 @@ function _G._detalhes:Start()
_detalhes.schedule_chat_enter = _detalhes:ScheduleTimer ("EnterChatChannel", 30)
end
local f = CreateFrame ("frame", "DetailsSelectProfile", UIParent)
f:SetSize (250, 300)
f:SetPoint ("center", UIParent)
f:SetMovable (true)
f:SetScript ("OnMouseDown", function (self)
if (not self.moving) then
self:StartMoving()
self.moving = true
end
end)
f:SetScript ("OnMouseUp", function (self)
if (self.moving) then
self:StopMovingOrSizing()
self.moving = false
end
end)
_detalhes:OpenProfiler()
local background = f:CreateTexture (nil, "background")
background:SetAllPoints()
background:SetTexture ([[Interface\AddOns\Details\images\welcome]])
local logo = f:CreateTexture (nil, "artwork")
logo:SetTexture ([[Interface\AddOns\Details\images\logotipo]])
logo:SetSize (256*0.8, 128*0.8)
logo:SetPoint ("center", f, "center", 0, 0)
logo:SetPoint ("top", f, "top", 20, 20)
f:Hide()
end