diff --git a/Libs/LibGraph-2.0/LibGraph-2.0.lua b/Libs/LibGraph-2.0/LibGraph-2.0.lua index 22f1a8cb..a4ee372f 100644 --- a/Libs/LibGraph-2.0/LibGraph-2.0.lua +++ b/Libs/LibGraph-2.0/LibGraph-2.0.lua @@ -662,7 +662,7 @@ end --Functions for Line Graph Data ------------------------------------------------------------------------------- -function GraphFunctions:AddDataSeries(points, color, n2) +function GraphFunctions:AddDataSeries(points, color, n2, linetexture) local data --Make sure there is data points if not points then @@ -680,7 +680,13 @@ function GraphFunctions:AddDataSeries(points, color, n2) end end - tinsert(self.Data,{Points = data; Color = color}) + if linetexture then + if not linetexture:find ("\\") and not linetexture:find ("//") then + linetexture = TextureDirectory..linetexture + end + end + + tinsert(self.Data,{Points = data; Color = color; LineTexture=linetexture}) self.NeedsUpdate = true end diff --git a/Libs/NickTag-1.0/NickTag-1.0.lua b/Libs/NickTag-1.0/NickTag-1.0.lua index 5db4402c..83c372bc 100644 --- a/Libs/NickTag-1.0/NickTag-1.0.lua +++ b/Libs/NickTag-1.0/NickTag-1.0.lua @@ -933,7 +933,8 @@ end do local avatar_pick_frame = CreateFrame ("frame", "AvatarPickFrame", UIParent) avatar_pick_frame:SetFrameStrata ("DIALOG") - avatar_pick_frame:SetBackdrop ({bgFile = [[Interface\DialogFrame\UI-DialogBox-Background]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 32, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}}) + avatar_pick_frame:SetBackdrop ({bgFile = [[Interface\FrameGeneral\UI-Background-Marble]], edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]], tile = true, tileSize = 256, edgeSize = 32, insets = {left = 11, right = 12, top = 12, bottom = 11}}) + avatar_pick_frame:SetBackdropColor (.3, .3, .3, .9) avatar_pick_frame:SetWidth (460) avatar_pick_frame:SetHeight (240) @@ -943,7 +944,6 @@ do avatar_pick_frame.selected_texcoord = {0, 1, 0, 1} avatar_pick_frame:SetPoint ("center", UIParent, "center", 200, 0) - --- local avatar_texture = avatar_pick_frame:CreateTexture ("AvatarPickFrameAvatarPreview", "overlay") avatar_texture:SetPoint ("topleft", avatar_pick_frame, "topleft", 167, -10) diff --git a/boot.lua b/boot.lua index 72e08b8d..dc33bc81 100644 --- a/boot.lua +++ b/boot.lua @@ -3,8 +3,8 @@ _ = nil _detalhes = LibStub("AceAddon-3.0"):NewAddon("_detalhes", "AceTimer-3.0", "AceComm-3.0", "AceSerializer-3.0", "NickTag-1.0") - _detalhes.build_counter = 79 --it's 79 for release - _detalhes.userversion = "v1.26.3" + _detalhes.build_counter = 83 --it's 83 for release + _detalhes.userversion = "v1.27.0" _detalhes.realversion = 28 _detalhes.version = _detalhes.userversion .. " (core " .. _detalhes.realversion .. ")" @@ -18,18 +18,16 @@ do local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" ) --[[ -|cFFFFFF00v1.26.1 (|cFFFFCC00Set 12, 2014|r|cFFFFFF00)|r:\n\n -|cFFFFFF00-|r Added tutorial and a config panel for bookmarks.\n\n -|cFFFFFF00-|r Added option for choose the format type of data broker's text.\n\n -|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n -|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n -|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n -|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n - +|cFFFFFF00v1.27.0 (|cFFFFCC00Set 27, 2014|r|cFFFFFF00)|r:\n\n +|cFFFFFF00-|r Minimalistic skin is now the ols minimalistic v2.\n\n +|cFFFFFF00-|r Minimalistic v2 got a new texture, little more darker.\n\n +|cFFFFFF00-|r Few tweaks to make more easy making groups of windows.\n\n +|cFFFFFF00-|r Bookmark now accepts more than two columns.\n\n +|cFFFFFF00-|r Bookmark now accepts more than two columns.\n\n --]] - Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.26.3 (|cFFFFCC00Set 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changed the way to set the broker text to be more customizable.\n\n|cFFFFFF00-|r Fixed the problem with custom display report.\n\n|cFFFFFF00-|r Added tutorial and a config panel for bookmarks.\n\n|cFFFFFF00-|r Added option for choose the format type of data broker's text.\n\n|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r." + Loc ["STRING_VERSION_LOG"] = "|cFFFFFF00v1.27.0 (|cFFFFCC00Set 27, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Minimalistic skin is now the old minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 got a new texture, little more darker.\n\n|cFFFFFF00-|r Few tweaks to make more easy making groups of windows.\n\n|cFFFFFF00-|r Bookmark now accepts more than two columns.\n\n|cFFFFFF00v1.26.3 (|cFFFFCC00Set 18, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Changed the way to set the broker text to be more customizable.\n\n|cFFFFFF00-|r Fixed the problem with custom display report.\n\n|cFFFFFF00-|r Added tutorial and a config panel for bookmarks.\n\n|cFFFFFF00-|r Added option for choose the format type of data broker's text.\n\n|cFFFFFF00-|r Changed few icons on damage done tooltip.\n\n|cFFFFFF00-|r Fixed the class color on texts for healing attribute.\n\n|cFFFFFF00-|r Added options for change the tooltip border's size, color and texture.\n\n|cFFFFFF00-|r Added buttons for test interrupt and cooldown announcers under raid tools section.\n\n|cFFFFFF00v1.25.1 (|cFFFFCC00Set 09, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added buttons to edit the total and percentage code for custom displays.\n\n|cFFFFFF00-|r Fixed a problem while report custom displays.\n\n|cFFFFFF00-|r Added Acitivity Time for Damage + Healing, tooltip show the activity separately.\n\n|cFFFFFF00-|r Major changes on Encounter Details Plugin making more easy to use.\n\n|cFFFFFF00-|r Removed Spell Details Plugin.\n\n|cFFFFFF00-|r Added new plugin for Solo Mode: Dps Tuning.\n\n|cFFFFFF00v1.24.5 (|cFFFFCC00Ago 31, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Raid Tools bracket on Options Panel.\n\n|cFFFFFF00-|r Added interrupt, cooldown and death announcers (raid tools).\n\n|cFFFFFF00-|r Added pre potion recognition, showing after the encounter on the chat only for you (raid tools).\n\n|cFFFFFF00-|r Added a Boss Emotes tab for Encounter Details plugin |cFF999999(thanks Bloodforce-Azralon)|r.\n\n|cFFFFFF00-|r Rework on Activity Time, now it is tuned to closely match warcraftlogs |cFF999999(thanks www.warcraftlogs.com)|r.\n\n|cFFFFFF00-|r Added two new customs: Damage Activity Time and Healing Activity Time.\n\n|cFFFFFF00-|r Time Attack Plugin now have six fixed time amount options for test your dps on training dummies.\n\n|cFFFFFF00-|r Time Attack Plugin can now also share results on your realm, between players with the same class.\n\n|cFFFFFF00v1.23.6 (|cFFFFCC00Ago 24, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added 2 new bar textures and 6 new fonts.\n\n|cFFFFFF00-|r Swapped left and middle button for enemy bars, now left button open damage taken and middle button player detail window.\n\n|cFFFFFF00-|r Added new skin: Minimalistic v2.\n\n|cFFFFFF00-|r Minimalistic v2 is now the default skin.\n\n|cFFFFFF00-|r Few changes on both icon packs with transparency.\n\n|cFFFFFF00-|r Replaced the slash command '/d' with '/de' |cFF999999(thanks @kamuul-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added custom spells for Atonement, Power Word: Solance and Life Bloom |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00v1.22.4 (|cFFFFCC00Ago 15, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added new skin: ElvUI Frame Style (Black White).\n\n|cFFFFFF00-|r Align With Right Chat Window option now check if the window have statusbar enabled.\n\n|cFFFFFF00-|r Few improvements on report for Deaths and Spells over Player Detail Window.\n\n|cFFFFFF00-|r Added option to disable reset button (reset only using its tooltip menu).\n\n|cFFFFFF00-|r Added option for disable window groups.\n\n|cFFFFFF00-|r Added option for select the icon pack to use, also added black white icon pack.\n\n|cFFFFFF00-|r Fixed many bugs involving skins and profiles, thing should run more smooth now.\n\n|cFFFFFF00-|r Plugin Time Attack now correctly saves the attempt when pressing the big save button.\n\n|cFFFFFF00-|r Added support for hotcorners.\n\n|cFFFFFF00v1.21.4 (|cFFFFCC00Ago 9, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added Shaman's Ancestral Guidance on cooldowns list |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Added a profile selection screen when Details! are running for the first time on a character.\n\n|cFFFFFF00-|r Added Menu Text Size option over miscellaneous section on options panel |cFF999999(thanks @ Revi-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed a bug over Healing Player Details Window where pets wasn't being shown |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed issue with summoning pets with unknown owners where it was breaking the summon of all the others pets. |cFF999999(thanks @ThunderLost-curse website)|r.\n\n|cFFFFFF00-|r Hot Corners isn't no more a part of Details!, instead of that, Hot Corner is now a standalone addon which needs to be installed separately for who wants to use it.\n\n|cFFFFFF00-|r Skin data is now stored inside the profiles, many code parts got rewrite, still may have few bugs but it's more reliable then before.\n\n|cFFFFFF00-|r Rework on Auras and Voidzones: now shows damage, dps and percentage. Also its tooltip got fixes and now shows the correct damage done to players.\n\n|cFFFFFF00-|r Tooltip for Enemies now shows damage taken from players |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Right clicking a real-time enemy bar, makes it back to Enemies display instead of show Bookmark panel |cFF999999(thanks @Arieth-mmochampion forum)|r.\n\n|cFFFFFF00-|r Tank comparison from previous segment now uses the same percentage method from player comparison panel.\n\n|cFFFFFF00-|r Fix bug with the slash command 'show' where was ignoring the window limit set on options panel |cFF999999(thanks @Castiel-US-Azralon realm)|r.\n\n|cFFFFFF00-|r Fixed few bugs with scroll bars, including scrolls on dropdown menu and player detail window |cFF999999(thanks @Revi-mmochampion forum)|r.\n\n|cFFFFFF00v1.20.2 (|cFFFFCC00Aug 1, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Added a option under Miscellaneous section to provide spell link instead of spell name for helpful spells when reporting a death |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Improvements done on how deaths are handled, now latest events before death will be more precise.\n\n|cFFFFFF00-|r Implemented Damage Taken from environment like lava, gravity, etc.\n\n|cFFFFFF00-|r Added Warlock's Fire and Brimstone spell on customized spells.\n\n|cFFFFFF00-|r Added dwarf racial Stone Form on cooldown list |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Bookmark now are shared between all characters.\n\n|cFFFFFF00-|r Fixed few inconsistencies with trash recognition.\n\n|cFFFFFF00-|r Fixed Cloud Capture where sometimes it wasn't sharing.\n\n|cFFFFFF00-|r Fixed report where it wasn't sharing for guild and raid when the player name box were empty.\n\n|cFFFFFF00-|r Report box now also saves the position and the last channel used to report |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r You Are Not Prepared plugin now have tooltips for spells and its window auto opens after a boss encounter.\n\n|cFFFFFF00-|r Advanced Death Logs plugin got full rewrite (and still are in development).\n\n|cFFFFFF00v1.19.0 - v1.19.1 - v1.19.2 (|cFFFFCC00Jul 21, 2014|r|cFFFFFF00)|r:\n\n|cFFFFFF00-|r Details! is now able to be translated by its community for all supported languages through Curse Forge Web Site:\n\n|cFFFFFF00http://wow.curseforge.com/addons/details/localization/|r\n\n|cFFFFFF00-|r Slash commands now are multi language, accepting both english and the localized language.\n\n|cFFFFFF00-|r Added Data Broker for: Combat Time, Player Dps and Player Hps.\n\n|cFFFFFF00-|r Rework on plugins: Timeline, You Are Not Prepared, Tiny Threat, Encounter Details. All those plugins got a options panel and few improvaments.\n\n|cFFFFFF00-|r Trash segments won't be saved anymore.\n\n|cFFFFFF00-|r Added support for plugins options.\n\n|cFFFFFF00-|r Revamp on Deaths report lines, adding links for harmful spells and changing the text order |cFF999999(thanks @skmzarn-mmochampion forum)|r.\n\n|cFFFFFF00-|r Modified the percentage used on Comparison panel |cFF999999(thanks @Mystery2012-mmochampion forum)|r.\n\n|cFFFFFF00-|r Fixed the Raid Dps and Hps data exported by Data Broker |cFF999999(thanks @Arieth-mmochampion forum)|r." Loc ["STRING_DETAILS1"] = "|cffffaeaeDetails!:|r " --> startup @@ -256,7 +254,10 @@ do _detalhes.listener:SetFrameStrata ("LOW") _detalhes.listener:SetFrameLevel (9) _detalhes.listener.FrameTime = 0 - + + _detalhes.overlay_frame = _CreateFrame ("Frame", nil, _UIParent) + _detalhes.overlay_frame:SetFrameStrata ("TOOLTIP") + ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --> functions diff --git a/functions/profiles.lua b/functions/profiles.lua index 2633cbc4..7df8d2cd 100644 --- a/functions/profiles.lua +++ b/functions/profiles.lua @@ -711,7 +711,7 @@ local default_profile = { --> window size max_window_size = {width = 480, height = 450}, - new_window_size = {width = 300, height = 95}, + new_window_size = {width = 320, height = 130}, window_clamp = {-8, 0, 21, -14}, disable_window_groups = false, disable_reset_button = false, diff --git a/functions/skins.lua b/functions/skins.lua index 35ead86f..731c9105 100644 --- a/functions/skins.lua +++ b/functions/skins.lua @@ -52,7 +52,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "default skin for Details!", + desc = "This was the first skin made for Details!, inspired in the standart wow intercace", can_change_alpha_head = false, icon_anchor_main = {-1, 1}, @@ -120,76 +120,11 @@ local _ }) _detalhes:InstallSkin ("Minimalistic", { - file = [[Interface\AddOns\Details\images\skins\classic_skin]], + file = [[Interface\AddOns\Details\images\skins\classic_skin_v1]], author = "Details!", version = "1.0", site = "unknown", - desc = "classic skin.", - - micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10}, - - can_change_alpha_head = true, - icon_anchor_main = {-1, -5}, - icon_anchor_plugins = {-7, -13}, - icon_plugins_size = {19, 18}, - - --anchors: - icon_point_anchor = {-37, 0}, - left_corner_anchor = {-107, 0}, - right_corner_anchor = {96, 0}, - - icon_point_anchor_bottom = {-37, 12}, - left_corner_anchor_bottom = {-107, 0}, - right_corner_anchor_bottom = {96, 0}, - - --overwrites - instance_cprops = { - hide_icon = true, - - menu_anchor = {-60, 0, side = 2}, - menu_anchor_down = {-55, -1}, - menu2_anchor = {32, 3}, - menu2_anchor_down = {32, 2}, - - menu_icons_size = 0.8, - plugins_grow_direction = 1, - - instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 11, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, - resetbutton_config = {size = {13, 13}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, - closebutton_config = {size = {19, 19}, alpha = 0.8}, - - show_sidebars = false, - show_statusbar = false, - color = {.3, .3, .3, 0.81}, - bg_alpha = 0.2, - - row_info = { - texture = "Blizzard Character Skills Bar", - font_face = "Arial Narrow", - texture_background_class_color = false, - texture_background = "Details Serenity", - fixed_texture_background_color = {0, 0, 0, 0.3186} - }, - attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"}, - }, - - callback = function (skin, instance, just_updating) - --none - end, - - skin_options = { - {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, - {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = set_tooltip_elvui2, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]}, - } - - }) - - _detalhes:InstallSkin ("Minimalistic v2", { - file = [[Interface\AddOns\Details\images\skins\classic_skin]], - author = "Details!", - version = "1.0", - site = "unknown", - desc = "classic skin.", + desc = "Simple skin with soft gray color and half transparent frames.", --\n micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10}, @@ -250,13 +185,80 @@ local _ } }) + + _detalhes:InstallSkin ("Minimalistic v2", { + file = [[Interface\AddOns\Details\images\skins\classic_skin]], + author = "Details!", + version = "1.0", + site = "unknown", + desc = "Same as the first Minimalistic, but this one is more darker and less transparent.", + + micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10}, + + can_change_alpha_head = true, + icon_anchor_main = {-1, -5}, + icon_anchor_plugins = {-7, -13}, + icon_plugins_size = {19, 18}, + + --anchors: + icon_point_anchor = {-37, 0}, + left_corner_anchor = {-107, 0}, + right_corner_anchor = {96, 0}, + + icon_point_anchor_bottom = {-37, 12}, + left_corner_anchor_bottom = {-107, 0}, + right_corner_anchor_bottom = {96, 0}, + + --overwrites + instance_cprops = { + hide_icon = true, + + menu_anchor = {-60, 1, side = 2}, + menu_anchor_down = {-55, -1}, + menu2_anchor = {32, 4}, + menu2_anchor_down = {32, 2}, + + menu_icons_size = 0.8, + plugins_grow_direction = 1, + + instancebutton_config = {size = {20, 16}, anchor = {5, 0}, textcolor = {.8, .6, .0, 0.8}, textsize = 10, textfont = "Friz Quadrata TT", highlight_texture = [[Interface\Buttons\UI-Panel-MinimizeButton-Highlight]]}, + resetbutton_config = {size = {13, 13}, anchor = {2, 0}, normal_texture = [[Interface\Addons\Details\Images\reset_button2]], highlight_texture = [[Interface\Addons\Details\Images\reset_button2]]}, + closebutton_config = {size = {19, 19}, alpha = 0.8}, + + show_sidebars = false, + show_statusbar = false, + color = {0.3058, 0.3058, 0.3058, 0.8838}, --0.9350 + bg_alpha = 0.3181, --0.4399 + + row_info = { + texture = "BantoBar", --"Details Serenity" + font_face = "Arial Narrow", + texture_background_class_color = false, + texture_background = "Details Serenity", + fixed_texture_background_color = {0, 0, 0, 0.3186}, + icon_file = [[Interface\AddOns\Details\images\classes_small_alpha]], + start_after_icon = false, + }, + attribute_text = {enabled = true, side = 1, text_size = 11, anchor = {-18, 4}, text_color = {1, 1, 1, 1}, text_face = "Arial Narrow"}, + }, + + callback = function (skin, instance, just_updating) + --none + end, + + skin_options = { + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP"], func = reset_tooltip, desc = Loc ["STRING_OPTIONS_SKIN_RESET_TOOLTIP_DESC"]}, + {type = "button", name = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3"], func = set_tooltip_elvui2, desc = Loc ["STRING_OPTIONS_SKIN_ELVUI_BUTTON3_DESC"]}, + } + + }) _detalhes:InstallSkin ("Flat Color", { file = [[Interface\AddOns\Details\images\skins\flat_skin]], author = "Details!", version = "1.0", site = "unknown", - desc = "a simple skin with opaque colors.", + desc = "Pure white with opaque colors makes this skin very different and peculiar.", micro_frames = {color = {1, 1, 1, 1}, font = "Friz Quadrata TT", size = 10, left = "DETAILS_STATUSBAR_PLUGIN_PATTRIBUTE"}, @@ -325,7 +327,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "skin with uniform gray color.", + desc = "Similar to minimalistic skin, but, this one have no transparency and also comes with the statusbar enabled.", --general can_change_alpha_head = true, @@ -588,7 +590,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "skin based on ElvUI addon.", + desc = "This skin is based on ElvUI's addons, relying with black and transparent frames.", --general can_change_alpha_head = true, @@ -687,7 +689,7 @@ local _ author = "Details!", version = "1.0", site = "unknown", - desc = "skin based on ElvUI addon.", + desc = "This skin is based on ElvUI's addons, with black and white frames and bars.", --general can_change_alpha_head = true, diff --git a/functions/slash.lua b/functions/slash.lua index 1bfcdf41..deae5ca1 100644 --- a/functions/slash.lua +++ b/functions/slash.lua @@ -79,6 +79,19 @@ function SlashCmdList.DETAILS (msg, editbox) -------- debug --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- + elseif (msg == "owner2") then + + local tip = CreateFrame('GameTooltip', 'GuardianOwnerTooltip', nil, 'GameTooltipTemplate') + function GetGuardianOwner(guid) + tip:SetOwner(WorldFrame, 'ANCHOR_NONE') + tip:SetHyperlink('unit:' .. guid or '') + local text = GuardianOwnerTooltipTextLeft2 + --return strmatch(text and text:GetText() or '', "^([^%s']+)'") + return text:GetText() + end + + print (GetGuardianOwner(UnitGUID ("target"))) + elseif (msg == "chat") then diff --git a/gumps/janela_options.lua b/gumps/janela_options.lua index e0ebcf1a..348a9888 100644 --- a/gumps/janela_options.lua +++ b/gumps/janela_options.lua @@ -4104,7 +4104,7 @@ function window:CreateFrame3() local buildSkinMenu = function() local skinOptions = {} for skin_name, skin_table in pairs (_detalhes.skins) do - local desc = "Author: |cFFFFFFFF" .. skin_table.author .. "|r\nVersion: |cFFFFFFFF" .. skin_table.version .. "|r\nSite: |cFFFFFFFF" .. skin_table.site .. "|r\nDesc: |cFFFFFFFF" .. skin_table.desc .. "|r" + local desc = "Author: |cFFFFFFFF" .. skin_table.author .. "|r\nVersion: |cFFFFFFFF" .. skin_table.version .. "|r\nSite: |cFFFFFFFF" .. skin_table.site .. "|r\n\nDesc: |cFFFFFFFF" .. skin_table.desc .. "|r" skinOptions [#skinOptions+1] = {value = skin_name, label = skin_name, onclick = onSelectSkin, icon = "Interface\\GossipFrame\\TabardGossipIcon", desc = desc} end return skinOptions diff --git a/gumps/janela_principal.lua b/gumps/janela_principal.lua index dda0e33f..fc3d85bf 100644 --- a/gumps/janela_principal.lua +++ b/gumps/janela_principal.lua @@ -376,7 +376,7 @@ local function VPL (instancia, esta_instancia) --> conferir esquerda if (instancia.ponto4.x < esta_instancia.ponto1.x) then --> a janela esta a esquerda if (instancia.ponto4.x+20 > esta_instancia.ponto1.x) then --> a janela esta a menos de 20 pixels de distância - if (instancia.ponto4.y < esta_instancia.ponto1.y + 20 and instancia.ponto4.y > esta_instancia.ponto1.y - 20) then --> a janela esta a +20 ou -20 pixels de distância na vertical + if (instancia.ponto4.y < esta_instancia.ponto1.y + 100 and instancia.ponto4.y > esta_instancia.ponto1.y - 100) then --> a janela esta a +20 ou -20 pixels de distância na vertical return 1 end end @@ -387,7 +387,7 @@ end local function VPB (instancia, esta_instancia) --> conferir baixo if (instancia.ponto1.y+20 < esta_instancia.ponto2.y-16) then --> a janela esta em baixo - if (instancia.ponto1.x > esta_instancia.ponto2.x-20 and instancia.ponto1.x < esta_instancia.ponto2.x+20) then --> a janela esta a 20 pixels de distância para a esquerda ou para a direita + if (instancia.ponto1.x > esta_instancia.ponto2.x-100 and instancia.ponto1.x < esta_instancia.ponto2.x+100) then --> a janela esta a 20 pixels de distância para a esquerda ou para a direita if (instancia.ponto1.y+20 > esta_instancia.ponto2.y-16-20) then --> esta a 20 pixels de distância return 2 end @@ -400,7 +400,7 @@ local function VPR (instancia, esta_instancia) --> conferir lateral direita if (instancia.ponto2.x > esta_instancia.ponto3.x) then --> a janela esta a direita if (instancia.ponto2.x-20 < esta_instancia.ponto3.x) then --> a janela esta a menos de 20 pixels de distância - if (instancia.ponto2.y < esta_instancia.ponto3.y + 20 and instancia.ponto2.y > esta_instancia.ponto3.y - 20) then --> a janela esta a +20 ou -20 pixels de distância na vertical + if (instancia.ponto2.y < esta_instancia.ponto3.y + 100 and instancia.ponto2.y > esta_instancia.ponto3.y - 100) then --> a janela esta a +20 ou -20 pixels de distância na vertical return 3 end end @@ -411,7 +411,7 @@ end local function VPT (instancia, esta_instancia) --> conferir cima if (instancia.ponto3.y-16 > esta_instancia.ponto4.y+20) then --> a janela esta em cima - if (instancia.ponto3.x > esta_instancia.ponto4.x-20 and instancia.ponto3.x < esta_instancia.ponto4.x+20) then --> a janela esta a 20 pixels de distância para a esquerda ou para a direita + if (instancia.ponto3.x > esta_instancia.ponto4.x-100 and instancia.ponto3.x < esta_instancia.ponto4.x+100) then --> a janela esta a 20 pixels de distância para a esquerda ou para a direita if (esta_instancia.ponto4.y+20+20 > instancia.ponto3.y-16) then return 4 end @@ -420,9 +420,74 @@ local function VPT (instancia, esta_instancia) return nil end -local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce +local color_red = {1, 0.2, 0.2} +local color_green = {0.2, 1, 0.2} + +local update_line = function (self, target_frame) + + --> based on weak auras frame movement code + local selfX, selfY = target_frame:GetCenter() + local anchorX, anchorY = self:GetCenter() + selfX, selfY = selfX or 0, selfY or 0 + anchorX, anchorY = anchorX or 0, anchorY or 0 + + local dX = selfX - anchorX + local dY = selfY - anchorY + local distance = sqrt (dX^2 + dY^2) + + local angle = atan2(dY, dX) + local numInterim = floor(distance/40) + + local guide_balls = _detalhes.guide_balls + if (not guide_balls) then + _detalhes.guide_balls = {} + guide_balls = _detalhes.guide_balls + end + + for index, ball in ipairs (guide_balls) do + ball:Hide() + end + + self.instance:AtualizaPontos() + target_frame.instance:AtualizaPontos() + + local color = color_red + local _R, _T, _L, _B = VPL (self.instance, target_frame.instance), VPB (self.instance, target_frame.instance), VPR (self.instance, target_frame.instance), VPT (self.instance, target_frame.instance) + if (_R or _T or _L or _B) then + color = color_green + end + + for i = 0, numInterim do + local x = (distance - (i * 40)) * cos (angle) + local y = (distance - (i * 40)) * sin (angle) + + local ball = guide_balls [i] + if (not ball) then + ball = _detalhes.overlay_frame:CreateTexture (nil, "Overlay") + ball:SetTexture ([[Interface\AddOns\Details\images\icons]]) + ball:SetSize (16, 16) + ball:SetAlpha (0.3) + ball:SetTexCoord (410/512, 426/512, 2/512, 18/512) + tinsert (guide_balls, ball) + end + + ball:ClearAllPoints() + ball:SetPoint("CENTER", self, "CENTER", x, y) --baseframse center + ball:Show() + ball:SetVertexColor (unpack (color)) + end + +end + +local tempo_movendo, precisa_ativar, instancia_alvo, tempo_fades, nao_anexados, flash_bounce, start_draw_lines local movement_onupdate = function (self, elapsed) + if (start_draw_lines and start_draw_lines > 0.95) then + update_line (self, instancia_alvo.baseframe) + elseif (start_draw_lines) then + start_draw_lines = start_draw_lines + elapsed + end + if (tempo_movendo and tempo_movendo < 0) then if (precisa_ativar) then --> se a instância estiver fechada @@ -444,15 +509,96 @@ local movement_onupdate = function (self, elapsed) for lado, livre in _ipairs (nao_anexados) do if (livre) then if (lado == 1) then + + local texture = instancia_alvo.h_esquerda.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -14) + else + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -34) + else + texture:SetPoint ("topright", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "bottomleft", 0, -20) + end + end + instancia_alvo.h_esquerda:Flash (1, 1, 2.0, false, 0, 0) tem_livre = true + elseif (lado == 2) then + + local texture = instancia_alvo.h_baixo.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -14) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -14) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, 0) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -34) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -34) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "bottomleft", 0, -20) + texture:SetPoint ("topright", instancia_alvo.baseframe, "bottomright", 0, -20) + end + end + instancia_alvo.h_baixo:Flash (1, 1, 2.0, false, 0, 0) tem_livre = true + elseif (lado == 3) then + + local texture = instancia_alvo.h_direita.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -14) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 20) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, 0) + end + else + if (instancia_alvo.show_statusbar) then + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -34) + else + texture:SetPoint ("topleft", instancia_alvo.baseframe, "topright", 0, 0) + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "bottomright", 0, -20) + end + end + instancia_alvo.h_direita:Flash (1, 1, 2.0, false, 0, 0) tem_livre = true + elseif (lado == 4) then + + local texture = instancia_alvo.h_cima.texture + texture:ClearAllPoints() + + if (instancia_alvo.toolbar_side == 1) then + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 20) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 20) + else + texture:SetPoint ("bottomleft", instancia_alvo.baseframe, "topleft", 0, 0) + texture:SetPoint ("bottomright", instancia_alvo.baseframe, "topright", 0, 0) + end + instancia_alvo.h_cima:Flash (1, 1, 2.0, false, 0, 0) tem_livre = true end @@ -507,6 +653,13 @@ local function move_janela (baseframe, iniciando, instancia) nao_anexados = {true, true, true, true} tempo_movendo = 1 flash_bounce = 0 + + start_draw_lines = 0 + for lado, snap_to in _pairs (instancia_alvo.snap) do + if (snap_to == instancia.meu_id) then + start_draw_lines = false + end + end for lado, snap_to in _pairs (instancia_alvo.snap) do if (snap_to) then @@ -553,7 +706,7 @@ local function move_janela (baseframe, iniciando, instancia) need_start = false end - + baseframe:SetScript ("OnUpdate", movement_onupdate) end @@ -563,6 +716,12 @@ local function move_janela (baseframe, iniciando, instancia) baseframe.isMoving = false baseframe:SetScript ("OnUpdate", nil) + if (_detalhes.guide_balls) then + for index, ball in ipairs (_detalhes.guide_balls) do + ball:Hide() + end + end + for _, ins in _detalhes:ListInstances() do if (ins.baseframe) then ins.baseframe:SetUserPlaced (false) @@ -649,8 +808,7 @@ local function move_janela (baseframe, iniciando, instancia) end end end ---# /tar Disassembled Crawler ---# /tar Deactivated Laser Turrets + _detalhes.snap_alert.playing = false _detalhes.snap_alert.animIn:Stop() _detalhes.snap_alert.animOut:Play() @@ -2339,7 +2497,7 @@ do end ---> ~inicio ~janela ~window ~nova +--> ~inicio ~janela ~window ~nova ~start function gump:CriaJanelaPrincipal (ID, instancia, criando) -- main frames ----------------------------------------------------------------------------------------------------------------------------------------------- @@ -2695,8 +2853,6 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) --> top local fcima = CreateFrame ("frame", "DetailsTopSideBarHighlight" .. instancia.meu_id, baseframe.cabecalho.fechar) - fcima:SetPoint ("topleft", baseframe.cabecalho.top_bg, "bottomleft", -10, 37) - fcima:SetPoint ("topright", baseframe.cabecalho.ball_r, "bottomright", -33, 37) gump:CreateFlashAnimation (fcima) fcima:Hide() @@ -2705,12 +2861,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.h_cima:SetTexCoord (0, 1, 0.5, 1) instancia.h_cima:SetPoint ("topleft", baseframe.cabecalho.top_bg, "bottomleft", -10, 37) instancia.h_cima:SetPoint ("topright", baseframe.cabecalho.ball_r, "bottomright", -97, 37) + instancia.h_cima:SetDesaturated (true) + fcima.texture = instancia.h_cima instancia.h_cima = fcima --> bottom local fbaixo = CreateFrame ("frame", "DetailsBottomSideBarHighlight" .. instancia.meu_id, baseframe.cabecalho.fechar) - fbaixo:SetPoint ("topleft", baseframe.rodape.esquerdo, "bottomleft", 16, 17) - fbaixo:SetPoint ("topright", baseframe.rodape.direita, "bottomright", -16, 17) gump:CreateFlashAnimation (fbaixo) fbaixo:Hide() @@ -2719,12 +2875,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.h_baixo:SetTexCoord (0, 1, 0, 0.5) instancia.h_baixo:SetPoint ("topleft", baseframe.rodape.esquerdo, "bottomleft", 16, 17) instancia.h_baixo:SetPoint ("topright", baseframe.rodape.direita, "bottomright", -16, 17) + instancia.h_baixo:SetDesaturated (true) + fbaixo.texture = instancia.h_baixo instancia.h_baixo = fbaixo --> left local fesquerda = CreateFrame ("frame", "DetailsLeftSideBarHighlight" .. instancia.meu_id, baseframe.cabecalho.fechar) - fesquerda:SetPoint ("topleft", baseframe.barra_esquerda, "topleft", -8, 0) - fesquerda:SetPoint ("bottomleft", baseframe.barra_esquerda, "bottomleft", -8, 0) gump:CreateFlashAnimation (fesquerda) fesquerda:Hide() @@ -2733,12 +2889,12 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.h_esquerda:SetTexCoord (0.5, 1, 0, 1) instancia.h_esquerda:SetPoint ("topleft", baseframe.barra_esquerda, "topleft", 40, 0) instancia.h_esquerda:SetPoint ("bottomleft", baseframe.barra_esquerda, "bottomleft", 40, 0) + instancia.h_esquerda:SetDesaturated (true) + fesquerda.texture = instancia.h_esquerda instancia.h_esquerda = fesquerda --> right local fdireita = CreateFrame ("frame", "DetailsRightSideBarHighlight" .. instancia.meu_id, baseframe.cabecalho.fechar) - fdireita:SetPoint ("topleft", baseframe.barra_direita, "topleft", 8, 18) - fdireita:SetPoint ("bottomleft", baseframe.barra_direita, "bottomleft", 8, 0) gump:CreateFlashAnimation (fdireita) fdireita:Hide() @@ -2747,6 +2903,8 @@ function gump:CriaJanelaPrincipal (ID, instancia, criando) instancia.h_direita:SetTexCoord (0, 0.5, 1, 0) instancia.h_direita:SetPoint ("topleft", baseframe.barra_direita, "topleft", 8, 18) instancia.h_direita:SetPoint ("bottomleft", baseframe.barra_direita, "bottomleft", 8, 0) + instancia.h_direita:SetDesaturated (true) + fdireita.texture = instancia.h_direita instancia.h_direita = fdireita --> done @@ -5897,10 +6055,6 @@ function gump:CriaCabecalho (baseframe, instancia) baseframe.cabecalho.fechar:SetScript ("OnLeave", close_button_onleave) baseframe.cabecalho.fechar:SetScript ("OnClick", close_button_onclick) - - baseframe.cabecalho.fechar:SetScript ("OnShow", function() - --print (debugstack()) - end) --> bola do canto esquedo superior --> primeiro criar a armação para apoiar as texturas baseframe.cabecalho.ball_point = baseframe.cabecalho.fechar:CreateTexture (nil, "overlay") diff --git a/gumps/switch.lua b/gumps/switch.lua index 4bc7394f..13c5daea 100644 --- a/gumps/switch.lua +++ b/gumps/switch.lua @@ -135,13 +135,14 @@ function _detalhes.switch:ShowMe (instancia) if (#_detalhes.switch.buttons < mostrar_quantas) then _detalhes.switch.slots = mostrar_quantas - _detalhes.switch:Update() end _detalhes.switch.mostrar_quantas = mostrar_quantas end _detalhes.switch:Resize() + _detalhes.switch:Update() + _detalhes.switch.frame:Show() if (not _detalhes.tutorial.bookmark_tutorial) then @@ -187,6 +188,7 @@ function _detalhes.switch:ShowMe (instancia) SwitchPanelTutorial.close_label:SetWidth (_detalhes.switch.frame:GetWidth()-30) end + _detalhes.switch:Resize() --instancia:StatusBarAlert (right_click_text, right_click_texture) --icon, color, time end @@ -332,10 +334,70 @@ function _detalhes.switch:Update() end end + end function _detalhes.switch:Resize() + local x = 7 + local y = 5 + + local window_width, window_height = _detalhes.switch.current_instancia:GetSize() + + local horizontal_amt = floor (math.max (window_width / 100, 2)) + local vertical_amt = floor ((window_height - y) / 20) + local size = window_width / horizontal_amt + + local frame = _detalhes.switch.frame + + for index, button in ipairs (_detalhes.switch.buttons) do + button:Hide() + end + + local i = 1 + for vertical = 1, vertical_amt do + x = 7 + for horizontal = 1, horizontal_amt do + local button = _detalhes.switch.buttons [i] + + local options = _detalhes.switch.table [i] + if (not options) then + options = {atributo = nil, sub_atributo = nil} + _detalhes.switch.table [i] = options + end + + if (not button) then + button = _detalhes.switch:NewSwitchButton (frame, i, x, y) + button:SetFrameLevel (frame:GetFrameLevel()+2) + _detalhes.switch.showing = _detalhes.switch.showing + 1 + end + + button:SetPoint ("topleft", frame, "topleft", x, -y) + button.textureNormal:SetPoint ("topleft", frame, "topleft", x, -y) + button.texturePushed:SetPoint ("topleft", frame, "topleft", x, -y) + button.textureH:SetPoint ("topleft", frame, "topleft", x, -y) + button.button2.texto:SetSize (size - 30, 12) + button.button2:SetPoint ("bottomright", button, "bottomright", size - 30, 0) + button.line:SetWidth (size - 15) + button.line2:SetWidth (size - 15) + + button:Show() + + i = i + 1 + x = x + size + if (i > 40) then + break + end + end + y = y + 20 + end + + _detalhes.switch.slots = i-1 + +end + +function _detalhes.switch:Resize2() + local x = 7 local y = 5 local xPlus = (_detalhes.switch.current_instancia:GetSize()/2)-5 @@ -352,6 +414,7 @@ function _detalhes.switch:Resize() button.button2:SetPoint ("bottomright", button, "bottomright", xPlus - 30, 0) button.line:SetWidth (xPlus - 15) button.line2:SetWidth (xPlus - 15) + x = x - xPlus y = y + _detalhes.switch.button_height jump = false @@ -365,6 +428,7 @@ function _detalhes.switch:Resize() button.button2:SetPoint ("bottomright", button, "bottomright", xPlus - 30, 0) button.line:SetWidth (xPlus - 20) button.line2:SetWidth (xPlus - 20) + x = x + xPlus jump = true end diff --git a/images/icons.tga b/images/icons.tga index cebd3a79..d96f1787 100644 Binary files a/images/icons.tga and b/images/icons.tga differ diff --git a/images/skins/classic_skin.tga b/images/skins/classic_skin.tga index 0d9cf515..044696b2 100644 Binary files a/images/skins/classic_skin.tga and b/images/skins/classic_skin.tga differ diff --git a/images/skins/classic_skin_v1.tga b/images/skins/classic_skin_v1.tga new file mode 100644 index 00000000..0d9cf515 Binary files /dev/null and b/images/skins/classic_skin_v1.tga differ