diff --git a/boot.lua b/boot.lua index 8665eeb3..d481ae64 100644 --- a/boot.lua +++ b/boot.lua @@ -4,7 +4,7 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") _detalhes.build_counter = 896 --it's 896 for release - _detalhes.userversion = "v3.13.4a" + _detalhes.userversion = "v3.14.0" _detalhes.realversion = 68 --core version _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" Details = _detalhes @@ -22,12 +22,12 @@ do --[[ |cFFFFFF00-|r .\n\n - +|cFFFFFF00v3.14.0 (|cFFFFCC00May 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changing textures for a smaller download size, files changes: options_window, copy, custom_bg, welcome.tga replaced with border_welcome and built-in background.\n\n --]] -- - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use.\n\n|cFFFFFF00-|r Time Line (plugin): added options to change the background color and scale.\n\n|cFFFFFF00-|r Raid Check (plugin): its window is now 'always on top'.\n\n|cFFFFFF00-|r Accuracy adjustments on overheal of Divine Aegis and Illuminated Healing.\n\n|cFFFFFF00-|r Removed healthstone from cooldown list, added Nature's Vigil.\n\n|cFFFFFF00-|r Enemies display now shows damage taken instead of damage done.\n\n|cFFFFFF00-|r Tooltip for enemies display now also show damage and healing done by the enemy.\n\n|cFFFFFF00-|r Added an option under miscellaneous to show neutral and hostile creatures on damage taken display.\n\n|cFFFFFF00-|r Added an option to ignore nicknames and always use character names.\n\n|cFFFFFF00-|r Enabling the display icon on title bar now makes the title text automatically move slightly to right.\n\n|cFFFFFF00-|r Fixed issue with skin changing when the window has the statusbar enabled.\n\n|cFFFFFF00v3.9.4 (|cFFFFCC00Feb 03, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added option 'Ignore Mass Toggle', when enabled the window won't be affected when hiding, showing or toggling all windows.\n\n|cFFFFFF00-|r Added window number for slash commands 'hide', 'show' and 'toggle'. Usage: '/details hide 1' to hide window 1.\n\n|cFFFFFF00-|r Removed keybinds for Open and Close, added toggle instead.\n\n|cFFFFFF00-|r Added slash command 'toggle'.\n\n|cFFFFFF00-|r Added display icons for all skins which still didn't have they.\n\n|cFFFFFF00-|r Improved 'Align with right chat' tool, now it also supports Forced Square skin." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v3.14.0 (|cFFFFCC00May 07, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changing textures for a smaller download size, files changes: options_window, copy, custom_bg, welcome.tga replaced with border_welcome and built-in background.\n\n|cFFFFFF00v3.13.4a (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Created 'Details! Forge' but is still under development: /details forge.\n\n|cFFFFFF00-|r Several improvements on combatlog reader and custom displays.\n\n|cFFFFFF00-|r Improvements on enemies damage taken tooltip.\n\n|cFFFFFF00v3.13.1 (|cFFFFCC00April 27, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added casted amount for healing and damage spells. The result is shown on Player Detail Window and Comparison Panel.\n\n|cFFFFFF00-|r Added uptime amount for healing spells on Player Detail Window.\n\n|cFFFFFF00-|r Added an option to disable lock/resize/ungroup buttons. It's under miscellaneous bracket on Options Panel.\n\n|cFFFFFF00-|r Wallpaper for menus on title bar got a customization option under tooltips bracket on Options Panel.\n\n|cFFFFFF00-|r Updated spell list for Crowd Control and class detection.\n\n|cFFFFFF00-|r Improved Weakaura creation tool under Encounter Details Plugin.\n\n|cFFFFFF00v3.12.10 (|cFFFFCC00April 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added the spell uptime on damage player detail window.\n\n|cFFFFFF00-|r Added Rune Tap as cooldown.\n\n|cFFFFFF00-|r Report lines for deaths is now inverted. No need to scroll up the chat to see the cause of death anymore.\n\n|cFFFFFF00-|r Fixed some annoyances with auto current feature where it was changing the segments even when the user were using the window.\n\n|cFFFFFF00v3.12.7 (|cFFFFCC00April 09, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added slash command /details profile .\n\n|cFFFFFF00v3.12.6 (|cFFFFCC00May 06, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): added a report button on Emotes tab.\n\n|cFFFFFF00-|r Encounter Details (plugin): improved Weakauras creation.\n\n|cFFFFFF00-|r Encounter Details (plugin): fixed the report text for interrupts and dispells.\n\n|cFFFFFF00-|r Crowd control by Pets now is merged with its owner.\n\n|cFFFFFF00-|r Truncated left text on bars now shows the entire text when hover over the bar.\n\n|cFFFFFF00-|r Added an extra option on minimap menu to disable the minimap icon.\n\n|cFFFFFF00-|r Fixed a problem when disabling the minimap icon through options panel.\n\n|cFFFFFF00-|r Fixed an issue with item level tracker feature.\n\n|cFFFFFF00v3.12.2 (|cFFFFCC00Mar 30, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Raid Check (plugin): added item level.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): bug fixes, it's important to update it.\n\n|cFFFFFF00-|r Time Line (plugin): bug fixes.\n\n|cFFFFFF00-|r Added option to disabled th eitem level tracker.\n\n|cFFFFFF00-|r Added item level on Raid Check plugin panel.\n\n|cFFFFFF00-|r Added Spirit Link Totem damage and healing on death log.\n\n|cFFFFFF00-|r Added the total of life exchanged by the Spirit Link Totem on player detail window.\n\n|cFFFFFF00-|r Added more spells for crowd control.\n\n|cFFFFFF00-|r Added scroll on bookmark panel.\n\n|cFFFFFF00-|r Fixed issue with Dps/Hps data broker which wasn't respecting the type of time (effective/activity) selected.\n\n|cFFFFFF00-|r Fixed few bugs when using the key bind to toggle windows.\n\n|cFFFFFF00v3.11.5 (|cFFFFCC00Mar 18, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Fixed an issue with overall data where max/min amount for spells was being calculated wrong.\n\n|cFFFFFF00-|r Fixed a problem while reporting enemy damage taken.\n\n|cFFFFFF00-|r Fixed an issue with damage taken by spell where some spells wasn't shown.\n\n|cFFFFFF00-|r Few improvements on tooltips.\n\n|cFFFFFF00-|r Fixed a accuracy problem with shaman's spirit link toten where its life exchange was considered healing done.\n\n|cFFFFFF00-|r Boss segments now need to have at least 30 seconds to be added on the overall data.\n\n|cFFFFFF00-|r When the segment limit is reach, segments with less combat time will be erased instead of the olders.\n\n|cFFFFFF00-|r Added item level tracker.\n\n|cFFFFFF00-|r Fixed window positioning when changing from Solo mode to Group mode.\n\n|cFFFFFF00-|r Added an option for change the amount of lines on death log.\n\n|cFFFFFF00-|r Added custom display for CC done.\n\n|cFFFFFF00v3.10.10 (|cFFFFCC00Mar 10, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): done a calibration on endurance calculation.\n\n|cFFFFFF00-|r Raid Check (plugin): now also show information for 50+ stats runes.\n\n|cFFFFFF00-|r Fixed cooldowns spell targets on overall data.\n\n|cFFFFFF00-|r Fixed report custom displays where sometimes it didn't report spell links.\n\n|cFFFFFF00-|r Replaced old report line saying 'for the last X segments' with 'overall data'.\n\n|cFFFFFF00-|r Mini-displays on statusbar are now more responsible to right button click.\n\n|cFFFFFF00-|r Added Mage's Greater Invisibility as cooldown.\n\n|cFFFFFF00v3.10.8 (|cFFFFCC00Mar 02, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Improved aura creation.\n\n|cFFFFFF00-|r Custom display 'My Spells' now also show your pets.\n\n|cFFFFFF00-|r Fixed 'Raid Check' plugin food detection.\n\n|cFFFFFF00v3.10.6 (|cFFFFCC00Feb 24, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Encounter Details (plugin): several bug fixes and improvements.\n\n|cFFFFFF00-|r Encounter Details (plugin): added new tab showing enemy spells from the encounter with an aura creation panel.\n\n|cFFFFFF00-|r Encounter Details (plugin): added phase indicators on graphic tab, hovering over shows the damage and heal for that specific phase.\n\n|cFFFFFF00-|r Segments menu now also show the encounter try number plus the elapsed combat time.\n\n|cFFFFFF00-|r Several improvements on Overall Data, also, now it has an option to not save it when the character logoff.\n\n|cFFFFFF00-|r Player Details window now closes with right click on any bar.\n\n|cFFFFFF00-|r Fixed Nature's Vigil cooldown.\n\n|cFFFFFF00v3.9.12a (|cFFFFCC00Feb 16, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Roll back on combat detection after reset data, might be causing problems.\n\n|cFFFFFF00v3.9.12 (|cFFFFCC00Feb 13, 2015|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): got report buttons for Endurance and Deaths Overall Damage.\n\n|cFFFFFF00-|r Advanced Death Logs (plugin): the Deaths and Endurance limits can now be changed under the plugin options.\n\n|cFFFFFF00-|r Chart Viewer (plugin): has been revamped and now it's less complicated to use." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " diff --git a/core/windows.lua b/core/windows.lua index eb4a612b..c3345b02 100644 --- a/core/windows.lua +++ b/core/windows.lua @@ -1591,28 +1591,52 @@ _detalhes:CriarInstancia (_, true) end) + function _detalhes:CreateWelcomePanel (name, parent, width, height, make_movable) + local f = CreateFrame ("frame", name, parent or UIParent) + f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, + edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16}) + f:SetBackdropColor (1, 1, 1, 0.75) + f:SetSize (width or 1, height or 1) + + if (make_movable) then + f:SetScript ("OnMouseDown", function(self, button) + if (self.isMoving) then + return + end + if (button == "RightButton") then + self:Hide() + else + self:StartMoving() + self.isMoving = true + end + end) + f:SetScript ("OnMouseUp", function(self, button) + if (self.isMoving and button == "LeftButton") then + self:StopMovingOrSizing() + self.isMoving = nil + end + end) + f:SetToplevel (true) + f:SetMovable (true) + end + + return f + end + function _detalhes:OpenBrokerTextEditor() if (not DetailsWindowOptionsBrokerTextEditor) then - local panel = _detalhes.gump:NewPanel (UIParent, nil, "DetailsWindowOptionsBrokerTextEditor", nil, 650, 200) + local panel = _detalhes:CreateWelcomePanel ("DetailsWindowOptionsBrokerTextEditor", nil, 650, 210, true) panel:SetPoint ("center", UIParent, "center") panel:Hide() panel:SetFrameStrata ("FULLSCREEN") - panel:SetBackdrop ({ bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64, insets = {left=3, right=3, top=3, bottom=3}}) - panel:DisableGradient() - panel:SetBackdropColor (0, 0, 0, 0) - panel.locked = false - local bg_texture = _detalhes.gump:NewImage (panel, [[Interface\AddOns\Details\images\welcome]], 1, 1, "background") - bg_texture:SetPoint ("topleft", panel, "topleft") - bg_texture:SetPoint ("bottomright", panel, "bottomright") - - local textentry = _detalhes.gump:NewSpecialLuaEditorEntry (panel.widget, 450, 180, "editbox", "$parentEntry", true) - textentry:SetPoint ("topleft", panel.widget, "topleft", 10, -10) + local textentry = _detalhes.gump:NewSpecialLuaEditorEntry (panel, 450, 185, "editbox", "$parentEntry", true) + textentry:SetPoint ("topleft", panel, "topleft", 10, -12) textentry.editbox:SetScript ("OnTextChanged", function() - local text = panel.widget.editbox:GetText() + local text = panel.editbox:GetText() _detalhes.data_broker_text = text _detalhes:BrokerTick() if (_G.DetailsOptionsWindow) then @@ -1642,7 +1666,7 @@ end local d = _detalhes.gump:NewDropDown (panel, _, "$parentTextOptionsDropdown", "TextOptionsDropdown", 150, 20, buildAddMenu, 1) - d:SetPoint ("topright", panel, "topright", -10, -14) + d:SetPoint ("topright", panel, "topright", -12, -14) --d:SetFrameStrata ("TOOLTIP") local optiontable = {"{dmg}", "{dps}", "{dpos}", "{ddiff}", "{heal}", "{hps}", "{hpos}", "{hdiff}", "{time}"} @@ -1766,11 +1790,11 @@ local color_button = _detalhes.gump:NewColorPickButton (panel, "$parentButton5", nil, color_func) color_button:SetSize (80, 20) - color_button:SetPoint ("topright", panel, "topright", -10, -102) + color_button:SetPoint ("topright", panel, "topright", -12, -102) color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"] local done = function() - local text = panel.widget.editbox:GetText() + local text = panel.editbox:GetText() _detalhes.data_broker_text = text if (_G.DetailsOptionsWindow) then _G.DetailsOptionsWindow19BrokerEntry.MyObject:SetText (_detalhes.data_broker_text) @@ -1782,7 +1806,7 @@ local ok_button = _detalhes.gump:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"] ok_button:InstallCustomTexture() - ok_button:SetPoint ("topright", panel, "topright", -10, -174) + ok_button:SetPoint ("topright", panel, "topright", -12, -174) local reset_button = _detalhes.gump:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText ("") end, nil, nil, nil, "Reset", 1) reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"] @@ -1796,51 +1820,44 @@ end - local panel = DetailsWindowOptionsBrokerTextEditor.MyObject + local panel = DetailsWindowOptionsBrokerTextEditor local text = _detalhes.data_broker_text:gsub ("||", "|") panel.default_text = text - panel.widget.editbox:SetText (text) + panel.editbox:SetText (text) panel:Show() end --> row text editor - local panel = _detalhes.gump:NewPanel (UIParent, nil, "DetailsWindowOptionsBarTextEditor", nil, 650, 200) + + local panel = _detalhes:CreateWelcomePanel ("DetailsWindowOptionsBarTextEditor", nil, 650, 210, true) panel:SetPoint ("center", UIParent, "center") panel:Hide() panel:SetFrameStrata ("FULLSCREEN") - panel:SetBackdrop ({ bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 64, insets = {left=3, right=3, top=3, bottom=3}}) - panel:DisableGradient() - panel:SetBackdropColor (0, 0, 0, 0) - panel.locked = false - local bg_texture = _detalhes.gump:NewImage (panel, [[Interface\AddOns\Details\images\welcome]], 1, 1, "background") - bg_texture:SetPoint ("topleft", panel, "topleft") - bg_texture:SetPoint ("bottomright", panel, "bottomright") - - function panel.widget:Open (text, callback, host, default) + function panel:Open (text, callback, host, default) if (host) then panel:SetPoint ("center", host, "center") end text = text:gsub ("||", "|") panel.default_text = text - panel.widget.editbox:SetText (text) + panel.editbox:SetText (text) panel.callback = callback panel.default = default or "" panel:Show() end - local textentry = _detalhes.gump:NewSpecialLuaEditorEntry (panel.widget, 450, 180, "editbox", "$parentEntry", true) - textentry:SetPoint ("topleft", panel.widget, "topleft", 10, -10) + local textentry = _detalhes.gump:NewSpecialLuaEditorEntry (panel, 450, 185, "editbox", "$parentEntry", true) + textentry:SetPoint ("topleft", panel, "topleft", 10, -12) local arg1_button = _detalhes.gump:NewButton (panel, nil, "$parentButton1", nil, 80, 20, function() textentry.editbox:Insert ("{data1}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "1"), 1) local arg2_button = _detalhes.gump:NewButton (panel, nil, "$parentButton2", nil, 80, 20, function() textentry.editbox:Insert ("{data2}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "2"), 1) local arg3_button = _detalhes.gump:NewButton (panel, nil, "$parentButton3", nil, 80, 20, function() textentry.editbox:Insert ("{data3}") end, nil, nil, nil, string.format (Loc ["STRING_OPTIONS_TEXTEDITOR_DATA"], "3"), 1) - arg1_button:SetPoint ("topright", panel, "topright", -10, -14) - arg2_button:SetPoint ("topright", panel, "topright", -10, -36) - arg3_button:SetPoint ("topright", panel, "topright", -10, -58) + arg1_button:SetPoint ("topright", panel, "topright", -12, -14) + arg2_button:SetPoint ("topright", panel, "topright", -12, -36) + arg3_button:SetPoint ("topright", panel, "topright", -12, -58) arg1_button:InstallCustomTexture() arg2_button:InstallCustomTexture() arg3_button:InstallCustomTexture() @@ -1961,8 +1978,8 @@ local func_button = _detalhes.gump:NewButton (panel, nil, "$parentButton4", nil, 80, 20, function() textentry.editbox:Insert ("{func local player = ...; return 0;}") end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_FUNC"], 1) local color_button = _detalhes.gump:NewColorPickButton (panel, "$parentButton5", nil, color_func) color_button:SetSize (80, 20) - func_button:SetPoint ("topright", panel, "topright", -10, -80) - color_button:SetPoint ("topright", panel, "topright", -10, -102) + func_button:SetPoint ("topright", panel, "topright", -12, -80) + color_button:SetPoint ("topright", panel, "topright", -12, -102) func_button:InstallCustomTexture() color_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_COLOR_TOOLTIP"] @@ -1981,7 +1998,7 @@ --tok_button:SetPoint ("topright", panel, "topright", -100, -36) local done = function() - local text = panel.widget.editbox:GetText() + local text = panel.editbox:GetText() text = text:gsub ("\n", "") local test = text @@ -2007,7 +2024,7 @@ local ok_button = _detalhes.gump:NewButton (panel, nil, "$parentButtonOk", nil, 80, 20, done, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_DONE"], 1) ok_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_DONE_TOOLTIP"] ok_button:InstallCustomTexture() - ok_button:SetPoint ("topright", panel, "topright", -10, -174) + ok_button:SetPoint ("topright", panel, "topright", -12, -174) local reset_button = _detalhes.gump:NewButton (panel, nil, "$parentDefaultOk", nil, 80, 20, function() textentry.editbox:SetText (panel.default) end, nil, nil, nil, Loc ["STRING_OPTIONS_TEXTEDITOR_RESET"], 1) reset_button.tooltip = Loc ["STRING_OPTIONS_TEXTEDITOR_RESET_TOOLTIP"] @@ -2105,29 +2122,9 @@ end end - local f = CreateFrame ("frame", nil, UIParent) --"DetailsSelectProfile" - f:SetSize (250, 300) - + local f = _detalhes:CreateWelcomePanel (nil, nil, 250, 300, true) 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) diff --git a/framework/panel.lua b/framework/panel.lua index ba403fbc..9a72d81e 100644 --- a/framework/panel.lua +++ b/framework/panel.lua @@ -1267,10 +1267,10 @@ function gump:CreateSimplePanel (parent, w, h, title, name) f:SetScript ("OnMouseDown", simple_panel_mouse_down) f:SetScript ("OnMouseUp", simple_panel_mouse_up) - - local bg = f:CreateTexture (nil, "background") - bg:SetAllPoints (f) - bg:SetTexture ([[Interface\AddOns\Details\images\welcome]]) + + f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, + edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16}) + f:SetBackdropColor (1, 1, 1, 0.75) local close = CreateFrame ("button", name .. "Close", f, "UIPanelCloseButton") close:SetSize (32, 32) diff --git a/framework/pictureedit.lua b/framework/pictureedit.lua index 3ce93b38..1690ac04 100644 --- a/framework/pictureedit.lua +++ b/framework/pictureedit.lua @@ -40,10 +40,6 @@ local _ edgeFile = [[Interface\AddOns\Details\images\border_3]], edgeSize = 9, insets = {left = 2, right = 2, top = 3, bottom = 3}}) background_frame:SetBackdropColor (0, 0, 0, 0.95) --- local background_frame_image = background_frame:CreateTexture (nil, "background") --- background_frame_image:SetAllPoints (background_frame) --- background_frame_image:SetTexture ([[Interface\AddOns\Details\images\welcome]]) - local haveHFlip = false local haveVFlip = false diff --git a/framework/textentry.lua b/framework/textentry.lua index acbbbd77..4d0f36db 100644 --- a/framework/textentry.lua +++ b/framework/textentry.lua @@ -724,7 +724,7 @@ function gump:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent) IndentationLib.enable (scrollframe.editbox, nil, 4) end - borderframe:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], + borderframe:SetBackdrop ({bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], edgeFile = [[Interface\AddOns\Details\images\border_3]], tile = 1, tileSize = 16, edgeSize = 16, insets = {left = 5, right = 5, top = 5, bottom = 5}}) borderframe:SetBackdropColor (0.090195, 0.090195, 0.188234, 1) borderframe:SetBackdropBorderColor (1, 1, 1, 1) diff --git a/gumps/janela_copy.lua b/gumps/janela_copy.lua index 1ec59aa7..6163ea4f 100644 --- a/gumps/janela_copy.lua +++ b/gumps/janela_copy.lua @@ -6,39 +6,47 @@ do --> panel function _detalhes:CreateCopyPasteWindow() - local panel = DetailsFrameWork:NewPanel (UIParent, _, "DetailsCopy", _, 512, 128, false) + + local panel = CreateFrame ("frame", "DetailsCopy", UIParent, "ButtonFrameTemplate") + panel:SetSize (512, 148) tinsert (UISpecialFrames, "DetailsCopy") panel:SetFrameStrata ("TOOLTIP") panel:SetPoint ("center", UIParent, "center") panel.locked = false - - DetailsFrameWork:NewImage (panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "background", nil, "background", "$parentBackGround") - panel.background:SetPoint() - - --> title - DetailsFrameWork:NewLabel (panel, _, "$parentTitle", "title", "Paste & Copy", "GameFontHighlightLeft", 12, {227/255, 186/255, 4/255}) - panel.title:SetPoint ("center", panel, "center") - panel.title:SetPoint ("top", panel, "top", 0, -18) - - --> close - panel.fechar = CreateFrame ("Button", nil, panel.widget, "UIPanelCloseButton") - panel.fechar:SetWidth (32) - panel.fechar:SetHeight (32) - panel.fechar:SetPoint ("TOPRIGHT", panel.widget, "TOPRIGHT", -1, -8) - panel.fechar:SetText ("X") - panel.fechar:SetFrameLevel (panel:GetFrameLevel()+2) - - panel.fechar:SetScript ("OnClick", function() - panel:Hide() + panel:SetToplevel (true) + panel:SetMovable (true) + panel:SetScript ("OnMouseDown", function(self, button) + if (self.isMoving) then + return + end + if (button == "RightButton") then + self:Hide() + else + self:StartMoving() + self.isMoving = true + end + end) + panel:SetScript ("OnMouseUp", function(self, button) + if (self.isMoving and button == "LeftButton") then + self:StopMovingOrSizing() + self.isMoving = nil + end end) + DetailsFrameWork:NewImage (panel, "Interface\\AddOns\\Details\\images\\copy", 512, 128, "overlay", nil, "background", "$parentBackGround") + panel.background:SetPoint (0, -25) + + --> title + panel.TitleText:SetText ("Paste & Copy") + panel.portrait:SetTexture ([[Interface\CHARACTERFRAME\TEMPORARYPORTRAIT-FEMALE-BLOODELF]]) + DetailsFrameWork:NewTextEntry (panel, _, "$parentTextEntry", "text", 476, 14) - panel.text:SetPoint (20, -106) + panel.text:SetPoint (20, -127) panel.text:SetHook ("OnEditFocusLost", function() panel:Hide() end) panel.text:SetHook ("OnChar", function() panel:Hide() end) DetailsFrameWork:NewLabel (panel, _, _, "desc", "paste on your web browser address bar", "OptionsFontHighlightSmall", 12) - panel.desc:SetPoint (340, -54) + panel.desc:SetPoint (340, -78) panel.desc.width = 150 panel.desc.height = 25 panel.desc.align = "|" @@ -48,10 +56,10 @@ do end function _detalhes:CopyPaste (link) - _G.DetailsCopy.MyObject.text.text = link - _G.DetailsCopy.MyObject.text:HighlightText() - _G.DetailsCopy.MyObject:Show() - _G.DetailsCopy.MyObject.text:SetFocus() + _G.DetailsCopy.text.text = link + _G.DetailsCopy.text:HighlightText() + _G.DetailsCopy:Show() + _G.DetailsCopy.text:SetFocus() end end \ No newline at end of file diff --git a/gumps/janela_custom.lua b/gumps/janela_custom.lua index 6b0b13ee..237a5ece 100644 --- a/gumps/janela_custom.lua +++ b/gumps/janela_custom.lua @@ -146,10 +146,26 @@ 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", 1) + 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 DetailsCustomPanel.IsImporting = false diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index 6c7072c7..01b26179 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -143,8 +143,30 @@ function _detalhes:OpenOptionsWindow (instance, no_reopen, section) background:SetPoint (0, 0) background:SetDrawLayer ("border") background:SetTexCoord (0, 0.8759765625, 0, 0.578125) + + local sub_background = window:CreateTexture ("DetailsOptionsWindowBackgroundWallpaper", "background") + --sub_background:SetTexture ([[Interface\FrameGeneral\UI-Background-Marble]], true) + sub_background:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]]) + sub_background:SetPoint ("topleft", window.widget, "topleft", 192, -80) + sub_background:SetPoint ("bottomright", window.widget, "bottomright", -30, 27) + --sub_background:SetVertTile (true) + --sub_background:SetHorizTile (true) + --sub_background:SetAlpha (0.81) + sub_background:SetAlpha (0.75) + --sub_background:Hide() + + local menu_background = window:CreateTexture ("DetailsOptionsWindowBackgroundMenu", "background") + --menu_background:SetTexture ([[Interface\AddOns\Details\images\options_window]], true) + menu_background:SetTexture ([[Interface\DialogFrame\UI-DialogBox-Background-Dark]]) + menu_background:SetPoint ("topleft", window.widget, "topleft", 29, -78) + menu_background:SetSize (164, 488) + --menu_background:SetTexCoord (327/1024, 488/1024, 627/1024, 663/1024) + --menu_background:SetAlpha (0.81) + menu_background:SetAlpha (0.75) + --menu_background:SetVertTile (true) + --menu_background:Hide() - local bigdog = g:NewImage (window, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180, 200, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog") + local bigdog = g:NewImage (window, [[Interface\MainMenuBar\UI-MainMenuBar-EndCap-Human]], 180*0.9, 200*0.9, nil, {1, 0, 0, 1}, "backgroundBigDog", "$parentBackgroundBigDog") bigdog:SetPoint ("bottomright", window, "bottomright", -8, 31) bigdog:SetAlpha (.25) @@ -8592,12 +8614,27 @@ function window:CreateFrame9() f:SetSize (512, 150) f:EnableMouse (true) f:SetMovable (true) - f:SetScript ("OnMouseDown", function() f:StartMoving() end) - f:SetScript ("OnMouseUp", function() f:StopMovingOrSizing() end) + f:SetScript ("OnMouseDown", function(self, button) + if (self.isMoving) then + return + end + if (button == "RightButton") then + self:Hide() + else + self:StartMoving() + self.isMoving = true + end + end) + f:SetScript ("OnMouseUp", function(self, button) + if (self.isMoving and button == "LeftButton") then + self:StopMovingOrSizing() + self.isMoving = nil + end + end) - local bg = f:CreateTexture (nil, "background") - bg:SetAllPoints() - bg:SetTexture ([[Interface\AddOns\Details\images\welcome]]) + f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, + edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16}) + f:SetBackdropColor (1, 1, 1, 0.75) tinsert (UISpecialFrames, "DetailsLoadWallpaperImage") @@ -9291,9 +9328,11 @@ function window:CreateFrame11() local f = DetailsAnnounceSelectCooldownIgnored f:SetSize (250, 400) f:SetPoint ("center", UIParent, "center", 0, 0) - local bg = f:CreateTexture (nil, "background") - bg:SetAllPoints (f) - bg:SetTexture ([[Interface\AddOns\Details\images\welcome]]) + + f:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], tile = true, tileSize = 128, insets = {left=3, right=3, top=3, bottom=3}, + edgeFile = [[Interface\AddOns\Details\images\border_welcome]], edgeSize = 16}) + f:SetBackdropColor (1, 1, 1, 0.75) + f:SetFrameStrata ("FULLSCREEN") local close = CreateFrame ("button", "DetailsAnnounceSelectCooldownIgnoredClose", f, "UIPanelCloseButton") close:SetSize (32, 32) diff --git a/gumps/janela_welcome.lua b/gumps/janela_welcome.lua index e864d129..37067feb 100644 --- a/gumps/janela_welcome.lua +++ b/gumps/janela_welcome.lua @@ -16,7 +16,7 @@ function _detalhes:OpenWelcomeWindow () local instance = _detalhes.tabela_instancias [1] - window = CreateFrame ("frame", "DetailsWelcomeWindow", UIParent) + window = _detalhes:CreateWelcomePanel ("DetailsWelcomeWindow", UIParent) window:SetPoint ("center", UIParent, "center", -200, 0) window:SetWidth (512) window:SetHeight (265) diff --git a/images/border_welcome.tga b/images/border_welcome.tga new file mode 100644 index 00000000..48fb04d4 Binary files /dev/null and b/images/border_welcome.tga differ diff --git a/images/button_disable_overlay.tga b/images/button_disable_overlay.tga index fe0af111..17d1cd91 100644 Binary files a/images/button_disable_overlay.tga and b/images/button_disable_overlay.tga differ diff --git a/images/copy.tga b/images/copy.tga index 2f1594d7..3a8d4904 100644 Binary files a/images/copy.tga and b/images/copy.tga differ diff --git a/images/custom_bg.tga b/images/custom_bg.tga index 9b71e06e..213b5878 100644 Binary files a/images/custom_bg.tga and b/images/custom_bg.tga differ diff --git a/images/options_window.tga b/images/options_window.tga index d1d57d33..547689da 100644 Binary files a/images/options_window.tga and b/images/options_window.tga differ diff --git a/images/welcome.tga b/images/welcome.tga deleted file mode 100644 index 7afd582f..00000000 Binary files a/images/welcome.tga and /dev/null differ