- Small visual improvement on tooltips.

- Fixed an issue when closing solo plugins with the red X button.
This commit is contained in:
Tercioo
2016-01-02 13:27:59 -02:00
parent e13a415d26
commit 05d9b10399
27 changed files with 238 additions and 154 deletions
+11 -7
View File
@@ -10,8 +10,8 @@
-- make into AceSerializer.
-- @class file
-- @name AceSerializer-3.0
-- @release $Id: AceSerializer-3.0.lua 1038 2011-10-03 01:39:58Z mikk $
local MAJOR,MINOR = "AceSerializer-3.0", 4
-- @release $Id: AceSerializer-3.0.lua 1135 2015-09-19 20:39:16Z nevcairiel $
local MAJOR,MINOR = "AceSerializer-3.0", 5
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not AceSerializer then return end
@@ -27,8 +27,8 @@ local tconcat = table.concat
local inf = math.huge
local serNaN -- can't do this in 4.3, see ace3 ticket 268
local serInf = tostring(inf)
local serNegInf = tostring(-inf)
local serInf, serInfMac = "1.#INF", "inf"
local serNegInf, serNegInfMac = "-1.#INF", "-inf"
-- Serialization functions
@@ -62,11 +62,15 @@ local function SerializeValue(v, res, nres)
elseif t=="number" then -- ^N = number (just tostring()ed) or ^F (float components)
local str = tostring(v)
if tonumber(str)==v --[[not in 4.3 or str==serNaN]] or str==serInf or str==serNegInf then
if tonumber(str)==v --[[not in 4.3 or str==serNaN]] then
-- translates just fine, transmit as-is
res[nres+1] = "^N"
res[nres+2] = str
nres=nres+2
elseif v == inf or v == -inf then
res[nres+1] = "^N"
res[nres+2] = v == inf and serInf or serNegInf
nres=nres+2
else
local m,e = frexp(v)
res[nres+1] = "^F"
@@ -147,9 +151,9 @@ end
local function DeserializeNumberHelper(number)
--[[ not in 4.3 if number == serNaN then
return 0/0
else]]if number == serNegInf then
else]]if number == serNegInf or number == serNegInfMac then
return -inf
elseif number == serInf then
elseif number == serInf or number == serInfMac then
return inf
else
return tonumber(number)
@@ -1,4 +1,4 @@
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
--[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 6
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
@@ -65,9 +65,7 @@ end})
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
-- TODO: Remove this after beta has gone out
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
+1 -1
View File
@@ -932,7 +932,7 @@ function DF:NewButton (parent, container, name, member, w, h, func, param1, para
DF.ButtonCounter = DF.ButtonCounter + 1
elseif (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
+27 -7
View File
@@ -893,7 +893,7 @@ function DF:CreateCoolTip()
end
function CoolTip:StatusBar (menuButton, StatusBar)
if (StatusBar) then
menuButton.statusbar:SetValue (StatusBar [1])
@@ -926,19 +926,38 @@ function DF:CreateCoolTip()
menuButton.spark2:Hide()
end
if (StatusBar [8]) then
local texture = SharedMedia:Fetch ("statusbar", StatusBar [8], true)
if (texture) then
menuButton.statusbar.texture:SetTexture (texture)
else
menuButton.statusbar.texture:SetTexture (StatusBar [8])
end
elseif (CoolTip.OptionsTable.StatusBarTexture) then
local texture = SharedMedia:Fetch ("statusbar", CoolTip.OptionsTable.StatusBarTexture, true)
if (texture) then
menuButton.statusbar.texture:SetTexture (texture)
else
menuButton.statusbar.texture:SetTexture (CoolTip.OptionsTable.StatusBarTexture)
end
else
menuButton.statusbar.texture:SetTexture ("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
end
--[[
if (CoolTip.OptionsTable.StatusBarTexture) then
menuButton.statusbar.texture:SetTexture (CoolTip.OptionsTable.StatusBarTexture)
else
menuButton.statusbar.texture:SetTexture ("Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar")
end
--]]
else
menuButton.statusbar:SetValue (0)
menuButton.statusbar2:SetValue (0)
menuButton.spark:Hide()
menuButton.spark2:Hide()
end
if (CoolTip.OptionsTable.LeftBorderSize) then
menuButton.statusbar:SetPoint ("left", menuButton, "left", 10 + CoolTip.OptionsTable.LeftBorderSize, 0)
else
@@ -1382,7 +1401,7 @@ function DF:CreateCoolTip()
elseif (CoolTip.OptionsTable.IgnoreButtonAutoHeight) then
frame1:SetHeight ( (temp+spacing) * -1)
else
frame1:SetHeight ( _math_max ( (frame1.hHeight * CoolTip.Indexes) + 12, 22 ))
frame1:SetHeight ( _math_max ( (frame1.hHeight * CoolTip.Indexes) + 8 + ((CoolTip.OptionsTable.ButtonsYMod or 0)*-1), 22 ))
end
end
@@ -1938,8 +1957,8 @@ function DF:CreateCoolTip()
----------------------------------------------------------------------
--> Reset cooltip
local default_backdrop = {bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile=[[Interface\Tooltips\UI-Tooltip-Border]], tile=true,
edgeSize=16, tileSize=16, insets = {left=3, right=3, top=4, bottom=4}}
local default_backdrop = {bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile = true,
edgeSize = 1, tileSize = 16, insets = {left = 0, right = 0, top = 0, bottom = 0}}
local default_backdrop_color = {0.09019, 0.09019, 0.18823, 1}
local default_backdropborder_color = {1, 1, 1, 1}
@@ -2232,7 +2251,7 @@ function DF:CreateCoolTip()
--> parameters: value [, color red, color green, color blue, color alpha [, glow]]
--> can also use a table or html color name in color red and send glow in color green
function CoolTip:AddStatusBar (statusbarValue, frame, ColorR, ColorG, ColorB, ColorA, statusbarGlow, backgroundBar)
function CoolTip:AddStatusBar (statusbarValue, frame, ColorR, ColorG, ColorB, ColorA, statusbarGlow, backgroundBar, barTexture)
--> need a previous line
if (CoolTip.Indexes == 0) then
@@ -2305,6 +2324,7 @@ function DF:CreateCoolTip()
statusbarTable [5] = ColorA
statusbarTable [6] = statusbarGlow
statusbarTable [7] = backgroundBar
statusbarTable [8] = barTexture
end
+3 -2
View File
@@ -905,14 +905,15 @@ function DF:NewDropDown (parent, container, name, member, w, h, func, default, t
DF.DropDownCounter = DF.DropDownCounter + 1
elseif (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local DropDownObject = {type = "dropdown", dframework = true}
+48 -17
View File
@@ -1,5 +1,5 @@
local dversion = 14
local dversion = 15
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
@@ -11,19 +11,24 @@ end
DetailsFrameworkCanLoad = true
local SharedMedia = LibStub:GetLibrary ("LibSharedMedia-3.0")
local _
local _type = type
local _unpack = unpack
local _
local upper = string.upper
DF.LabelNameCounter = 1
DF.PictureNameCounter = 1
DF.BarNameCounter = 1
DF.DropDownCounter = 1
DF.PanelCounter = 1
DF.ButtonCounter = 1
DF.SliderCounter = 1
DF.SplitBarCounter = 1
--> will always give a very random name for our widgets
local init_counter = math.random (1, 1000000)
DF.LabelNameCounter = DF.LabelNameCounter or init_counter
DF.PictureNameCounter = DF.PictureNameCounter or init_counter
DF.BarNameCounter = DF.BarNameCounter or init_counter
DF.DropDownCounter = DF.DropDownCounter or init_counter
DF.PanelCounter = DF.PanelCounter or init_counter
DF.SimplePanelCounter = DF.SimplePanelCounter or init_counter
DF.ButtonCounter = DF.ButtonCounter or init_counter
DF.SliderCounter = DF.SliderCounter or init_counter
DF.SwitchCounter = DF.SwitchCounter or init_counter
DF.SplitBarCounter = DF.SplitBarCounter or init_counter
DF.FrameWorkVersion = tostring (dversion)
function DF:PrintVersion()
@@ -32,12 +37,14 @@ end
LibStub:GetLibrary("AceTimer-3.0"):Embed (DF)
--> get the working folder
do
local path = string.match (debugstack (1, 1, 0), "AddOns\\(.+)fw.lua")
if (path) then
DF.folder = "Interface\\AddOns\\" .. path
else
DF.folder = ""
--> if not found, try to use the last valid one
DF.folder = DF.folder or ""
end
end
@@ -94,6 +101,7 @@ local embed_functions = {
"ShowTextPromptPanel",
"www_icons",
"GetTemplate",
"InstallTemplate",
"GetFrameworkFolder",
"ShowPanicWarning",
}
@@ -868,17 +876,40 @@ DF.slider_templates ["OPTIONS_SLIDER_TEMPLATE"] = {
thumbcolor = {0, 0, 0, 0.5},
}
function DF:GetTemplate (type, template_name)
function DF:InstallTemplate (widget_type, template_name, template)
widget_type = string.lower (widget_type)
local template_table
if (type == "font") then
if (widget_type == "font") then
template_table = DF.font_templates
elseif (type == "dropdown") then
elseif (widget_type == "dropdown") then
template_table = DF.dropdown_templates
elseif (type == "button") then
elseif (widget_type == "button") then
template_table = DF.button_templates
elseif (type == "switch") then
elseif (widget_type == "switch") then
template_table = DF.switch_templates
elseif (type == "slider") then
elseif (widget_type == "slider") then
template_table = DF.slider_templates
end
template_table [template_name] = template
return template
end
function DF:GetTemplate (widget_type, template_name)
widget_type = string.lower (widget_type)
local template_table
if (widget_type == "font") then
template_table = DF.font_templates
elseif (widget_type == "dropdown") then
template_table = DF.dropdown_templates
elseif (widget_type == "button") then
template_table = DF.button_templates
elseif (widget_type == "switch") then
template_table = DF.switch_templates
elseif (widget_type == "slider") then
template_table = DF.slider_templates
end
return template_table [template_name]
+3 -4
View File
@@ -244,7 +244,7 @@ end
function DF:NewLabel (parent, container, name, member, text, font, size, color, layer)
if (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
@@ -256,9 +256,8 @@ function DF:NewLabel (parent, container, name, member, text, font, size, color,
end
if (name:find ("$parent")) then
local pname = parent:GetName()
assert (pname, "label used $parent but parent has no name.")
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local LabelObject = {type = "label", dframework = true}
+3 -2
View File
@@ -646,13 +646,14 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)
DF.BarNameCounter = DF.BarNameCounter + 1
elseif (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
elseif (not container) then
container = parent
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local BarObject = {type = "bar", dframework = true}
+12 -12
View File
@@ -18,8 +18,6 @@ local cleanfunction = function() end
local PanelMetaFunctions = {}
local APIFrameFunctions
local simple_panel_counter = 1
------------------------------------------------------------------------------------------------------------
--> metatables
@@ -1456,7 +1454,6 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
local simple_panel_counter = 1
local simple_panel_mouse_down = function (self, button)
if (button == "RightButton") then
if (self.IsMoving) then
@@ -1501,8 +1498,8 @@ local no_options = {}
function DF:CreateSimplePanel (parent, w, h, title, name, panel_options)
if (not name) then
name = "DetailsFrameworkSimplePanel" .. simple_panel_counter
simple_panel_counter = simple_panel_counter + 1
name = "DetailsFrameworkSimplePanel" .. DF.SimplePanelCounter
DF.SimplePanelCounter = DF.SimplePanelCounter + 1
end
if (not parent) then
parent = UIParent
@@ -1560,8 +1557,6 @@ function DF:CreateSimplePanel (parent, w, h, title, name, panel_options)
f.SetTitle = simple_panel_settitle
simple_panel_counter = simple_panel_counter + 1
return f
end
@@ -1836,17 +1831,21 @@ function DF:ShowTextPromptPanel (message, callback)
prompt:SetPoint ("top", f, "top", 0, -15)
prompt:SetJustifyH ("center")
f.prompt = prompt
local button_true = DF:CreateButton (f, nil, 60, 20, "Okey")
local button_text_template = DF:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = DF:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local button_true = DF:CreateButton (f, nil, 60, 20, "Okey", nil, nil, nil, nil, nil, nil, options_dropdown_template, button_text_template)
button_true:SetPoint ("bottomleft", f, "bottomleft", 10, 5)
f.button_true = button_true
local button_false = DF:CreateButton (f, function() f.textbox:ClearFocus(); f:Hide() end, 60, 20, "Cancel")
local button_false = DF:CreateButton (f, function() f.textbox:ClearFocus(); f:Hide() end, 60, 20, "Cancel", nil, nil, nil, nil, nil, nil, options_dropdown_template, button_text_template)
button_false:SetPoint ("bottomright", f, "bottomright", -10, 5)
f.button_false = button_false
local textbox = DF:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, nil, nil)
local textbox = DF:CreateTextEntry (f, function()end, 380, 20, "textbox", nil, nil, options_dropdown_template)
textbox:SetPoint ("topleft", f, "topleft", 10, -45)
f.EntryBox = textbox
button_true:SetClickFunction (function()
local my_func = button_true.true_function
@@ -1866,9 +1865,10 @@ function DF:ShowTextPromptPanel (message, callback)
DF.text_prompt_panel:Show()
DetailsFrameworkPrompt.EntryBox:SetText ("")
DF.text_prompt_panel.prompt:SetText (message)
DF.text_prompt_panel.button_true.true_function = callback
DF.text_prompt_panel.textbox:SetText ("")
DF.text_prompt_panel.textbox:SetFocus (true)
end
+3 -2
View File
@@ -213,7 +213,7 @@ end
function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
if (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not name) then
@@ -222,7 +222,8 @@ function DF:NewImage (parent, texture, w, h, layer, coords, member, name)
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local ImageObject = {type = "image", dframework = true}
+6 -6
View File
@@ -18,7 +18,6 @@ local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local cleanfunction = function() end
local APISliderFunctions = false
local SliderMetaFunctions = {}
local NameLessSlider = 1
------------------------------------------------------------------------------------------------------------
--> metatables
@@ -877,10 +876,10 @@ function DF:NewSwitch (parent, container, name, member, w, h, ltext, rtext, defa
--> early checks
if (not name) then
name = "DetailsFrameWorkSlider" .. NameLessSlider
NameLessSlider = NameLessSlider + 1
name = "DetailsFrameWorkSlider" .. DF.SwitchCounter
DF.SwitchCounter = DF.SwitchCounter + 1
elseif (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
@@ -1035,14 +1034,15 @@ function DF:NewSlider (parent, container, name, member, w, h, min, max, step, de
DF.SliderCounter = DF.SliderCounter + 1
end
if (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local SliderObject = {type = "slider", dframework = true}
+3 -2
View File
@@ -539,14 +539,15 @@ function DF:NewSplitBar (parent, container, name, member, w, h)
DF.SplitBarCounter = DF.SplitBarCounter + 1
end
if (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
container = parent
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local SplitBarObject = {type = "barsplit", dframework = true}
+17 -8
View File
@@ -183,6 +183,13 @@ DF.TextEntryCounter = 1
end
function TextEntryMetaFunctions:SetText (text)
self.editbox:SetText (text)
end
function TextEntryMetaFunctions:GetText()
return self.editbox:GetText()
end
--> frame levels
function TextEntryMetaFunctions:GetFrameLevel()
return self.editbox:GetFrameLevel()
@@ -470,23 +477,23 @@ DF.TextEntryCounter = 1
function TextEntryMetaFunctions:SetTemplate (template)
if (template.width) then
self:SetWidth (template.width)
self.editbox:SetWidth (template.width)
end
if (template.height) then
self:SetHeight (template.height)
self.editbox:SetHeight (template.height)
end
if (template.backdrop) then
self:SetBackdrop (template.backdrop)
self.editbox:SetBackdrop (template.backdrop)
end
if (template.backdropcolor) then
local r, g, b, a = DF:ParseColors (template.backdropcolor)
self:SetBackdropColor (r, g, b, a)
self.editbox:SetBackdropColor (r, g, b, a)
self.onleave_backdrop = {r, g, b, a}
end
if (template.backdropbordercolor) then
local r, g, b, a = DF:ParseColors (template.backdropbordercolor)
self:SetBackdropBorderColor (r, g, b, a)
self.editbox:SetBackdropBorderColor (r, g, b, a)
self.editbox.current_bordercolor[1] = r
self.editbox.current_bordercolor[2] = g
self.editbox.current_bordercolor[3] = b
@@ -509,7 +516,7 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
DF.TextEntryCounter = DF.TextEntryCounter + 1
elseif (not parent) then
return nil
return error ("Details! FrameWork: parent not found.", 2)
end
if (not container) then
@@ -517,7 +524,8 @@ function DF:NewTextEntry (parent, container, name, member, w, h, func, param1, p
end
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local TextEntryObject = {type = "textentry", dframework = true}
@@ -667,7 +675,8 @@ end
function DF:NewSpecialLuaEditorEntry (parent, w, h, member, name, nointent)
if (name:find ("$parent")) then
name = name:gsub ("$parent", parent:GetName())
local parentName = DF.GetParentName (parent)
name = name:gsub ("$parent", parentName)
end
local borderframe = CreateFrame ("Frame", name, parent)
+5 -33
View File
@@ -1,39 +1,12 @@
--[[
Name: DBIcon-1.0
Revision: $Rev: 34 $
Author(s): Rabbit (rabbit.magtheridon@gmail.com)
Description: Allows addons to register to recieve a lightweight minimap icon as an alternative to more heavy LDB displays.
Dependencies: LibStub
License: GPL v2 or later.
]]
--[[
Copyright (C) 2008-2011 Rabbit
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
]]
-----------------------------------------------------------------------
-- DBIcon-1.0
-- LibDBIcon-1.0
--
-- Disclaimer: Most of this code was ripped from Barrel but fixed, streamlined
-- and cleaned up a lot so that it no longer sucks.
-- Allows addons to easily create a lightweight minimap icon as an alternative to heavier LDB displays.
--
local DBICON10 = "LibDBIcon-1.0"
local DBICON10_MINOR = tonumber(("$Rev: 34 $"):match("(%d+)"))
local DBICON10_MINOR = 34 -- Bump on changes
if not LibStub then error(DBICON10 .. " requires LibStub.") end
local ldb = LibStub("LibDataBroker-1.1", true)
if not ldb then error(DBICON10 .. " requires LibDataBroker-1.1.") end
@@ -46,7 +19,7 @@ lib.callbackRegistered = lib.callbackRegistered or nil
lib.callbacks = lib.callbacks or LibStub("CallbackHandler-1.0"):New(lib)
lib.notCreated = lib.notCreated or {}
function lib:IconCallback(event, name, key, value, dataobj)
function lib:IconCallback(event, name, key, value)
if lib.objects[name] then
if key == "icon" then
lib.objects[name].icon:SetTexture(value)
@@ -73,7 +46,6 @@ if not lib.callbackRegistered then
lib.callbackRegistered = true
end
-- Tooltip code ripped from StatBlockCore by Funkydude
local function getAnchors(frame)
local x, y = frame:GetCenter()
if not x or not y then return "CENTER" end
@@ -103,7 +75,7 @@ end
--------------------------------------------------------------------------------
local onClick, onMouseUp, onMouseDown, onDragStart, onDragStop, onDragEnd, updatePosition
local onClick, onMouseUp, onMouseDown, onDragStart, onDragStop, updatePosition
do
local minimapShapes = {
+25 -1
View File
@@ -2,7 +2,7 @@
assert(LibStub, "LibDataBroker-1.1 requires LibStub")
assert(LibStub:GetLibrary("CallbackHandler-1.0", true), "LibDataBroker-1.1 requires CallbackHandler-1.0")
local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 3)
local lib, oldminor = LibStub:NewLibrary("LibDataBroker-1.1", 4)
if not lib then return end
oldminor = oldminor or 0
@@ -64,3 +64,27 @@ if oldminor < 1 then
return self.namestorage[dataobject]
end
end
if oldminor < 4 then
local next = pairs(attributestorage)
function lib:pairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:pairs('dataobjectname') or ldb:pairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return next, attributestorage[dataobj], nil
end
local ipairs_iter = ipairs(attributestorage)
function lib:ipairs(dataobject_or_name)
local t = type(dataobject_or_name)
assert(t == "string" or t == "table", "Usage: ldb:ipairs('dataobjectname') or ldb:ipairs(dataobject)")
local dataobj = self.proxystorage[dataobject_or_name] or dataobject_or_name
assert(attributestorage[dataobj], "Data object not found")
return ipairs_iter, attributestorage[dataobj], 0
end
end
+3 -2
View File
@@ -1,4 +1,5 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="LibSharedMedia-3.0.lua" />
</Ui>
<Include file="LibSharedMedia-3.0\lib.xml"/>
</Ui>
+7 -7
View File
File diff suppressed because one or more lines are too long
+8 -6
View File
@@ -1288,9 +1288,8 @@
end
function _detalhes:AddTooltipHeaderStatusbar (r, g, b, a)
--GameCooltip:AddStatusBar (100, 1, 1, 1, 1, a, nil, nil, [[Interface\WorldStateFrame\WORLDSTATEFINALSCORE-HIGHLIGHT]])
GameCooltip:AddStatusBar (100, 1, unpack (_detalhes.tooltip.header_statusbar))
local r, g, b, a, statusbarGlow, backgroundBar = unpack (_detalhes.tooltip.header_statusbar)
GameCooltip:AddStatusBar (100, 1, r, g, b, a, statusbarGlow, backgroundBar, "Skyline")
end
-- /run local a,b=_detalhes.tooltip.header_statusbar,0.3;a[1]=b;a[2]=b;a[3]=b;a[4]=0.8;
@@ -1319,12 +1318,15 @@
GameCooltip:SetOption ("TextColorRight", _detalhes.tooltip.fontcolor_right)
GameCooltip:SetOption ("TextShadow", _detalhes.tooltip.fontshadow and "OUTLINE")
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetOption ("LeftBorderSize", -8)
GameCooltip:SetOption ("RightBorderSize", 8)
GameCooltip:SetOption ("ButtonsYMod", 4)
GameCooltip:SetOption ("MinWidth", _math_max (230, self.baseframe:GetWidth()*0.9))
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_background]])
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) --{.090, .090, .188, .1}
--GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, backgroundColor, _detalhes.tooltip_border_color) --{.090, .090, .188, .1}
GameCooltip:SetBackdrop (1, _detalhes.cooltip_preset2_backdrop, {0.37, 0.37, 0.37, 1}, {0, 0, 0, 1})
local myPoint = _detalhes.tooltip.anchor_point
local anchorPoint = _detalhes.tooltip.anchor_relative
+1
View File
@@ -3,6 +3,7 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
+3 -2
View File
@@ -11,6 +11,7 @@
local _math_floor = math.floor --lua locals
local _UnitAura = UnitAura
local _
local gump = _detalhes.gump --details local
@@ -59,8 +60,8 @@
instance.baseframe.cabecalho.modo_selecao:GetScript ("OnEnter")(instance.baseframe.cabecalho.modo_selecao)
end
local close_window = gump:NewButton (button.close_confirmation, _, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local back_to_group_and_raid = gump:NewButton (button.close_confirmation, _, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local close_window = gump:NewButton (button.close_confirmation, nil, "$parentCloseWindowButton", "CloseWindowButton", 140, 20, close_func, nil, nil, nil, Loc ["STRING_MENU_CLOSE_INSTANCE"], 1, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local back_to_group_and_raid = gump:NewButton (button.close_confirmation, nil, "$parentBackToGroupButton", "BackToGroupButton", 140, 20, group_func, nil, nil, nil, Loc ["STRING_SWITCH_TO"] .. ": " .. Loc ["STRING_MODE_GROUP"], 2, gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
close_window:SetIcon ([[Interface\Buttons\UI-Panel-MinimizeButton-Up]], nil, nil, nil, {0.143125, 0.8653125, 0.1446875, 0.8653125}, nil, nil, 2)
back_to_group_and_raid:SetIcon ([[Interface\AddOns\Details\images\modo_icones]], nil, nil, nil, {32/256, 32/256*2, 0, 1}, nil, nil, 2)
+3 -2
View File
@@ -3,6 +3,7 @@
local _detalhes = _G._detalhes
local Loc = LibStub ("AceLocale-3.0"):GetLocale ( "Details" )
local SharedMedia = LibStub:GetLibrary("LibSharedMedia-3.0")
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
@@ -179,9 +180,9 @@ end
f.background:SetDesaturated (true)
f.BackdropTable.bgFile = _detalhes.tooltip_backdrop.bgFile
f.BackdropTable.edgeFile = _detalhes.tooltip_backdrop.edgeFile
f.BackdropTable.edgeFile = [[Interface\Buttons\WHITE8X8]] --_detalhes.tooltip_backdrop.edgeFile
f.BackdropTable.tile = _detalhes.tooltip_backdrop.tile
f.BackdropTable.edgeSize = _detalhes.tooltip_backdrop.edgeSize
f.BackdropTable.edgeSize = 1 --_detalhes.tooltip_backdrop.edgeSize
f.BackdropTable.tileSize = _detalhes.tooltip_backdrop.tileSize
f:SetBackdrop (f.BackdropTable)
+1
View File
@@ -2,6 +2,7 @@
local _detalhes = _G._detalhes
local _tempo = time()
local _
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> local pointers
+5 -2
View File
@@ -794,7 +794,7 @@
local white_table = {1, 1, 1, 1}
local black_table = {0, 0, 0, 1}
local gray_table = {0.37, 0.37, 0.37, 1}
local gray_table = {0.37, 0.37, 0.37, 0.95}
local preset2_backdrop = {bgFile = [[Interface\AddOns\Details\images\background]], edgeFile = [[Interface\Buttons\WHITE8X8]], tile=true,
edgeSize = 1, tileSize = 64, insets = {left = 0, right = 0, top = 0, bottom = 0}}
@@ -825,6 +825,9 @@
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
GameCooltip:SetColor (1, 0, 0, 0, 0)
GameCooltip:SetOption ("LeftBorderSize", -5)
GameCooltip:SetOption ("RightBorderSize", 5)
GameCooltip:SetBackdrop (1, preset2_backdrop, gray_table, black_table)
elseif (preset == 2.1) then
@@ -2177,7 +2180,7 @@
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},
f:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], 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)
+1 -1
View File
@@ -1020,7 +1020,7 @@ local default_profile = {
anchor_offset = {0, 0},
border_texture = "Details BarBorder 3",
border_color = {1, 1, 1, 0},
border_color = {0, 0, 0, 1},
border_size = 14,
tooltip_max_abilities = 5,
+6 -9
View File
@@ -2138,35 +2138,31 @@ local icon_frame_on_enter = function (self)
local got_info
if (ilvl) then
GameCooltip:AddLine ("Item Level:", ilvl and floor (ilvl.ilvl) or "??")
GameCooltip:AddLine (STAT_AVERAGE_ITEM_LEVEL .. ":", ilvl and floor (ilvl.ilvl) or "??") --> Loc from GlobalStrings.lua
_detalhes:AddTooltipBackgroundStatusbar()
got_info = true
end
if (talent_string ~= "") then
GameCooltip:AddLine ("Talents:", talent_string)
GameCooltip:AddLine (TALENTS .. ":", talent_string) --> Loc from GlobalStrings.lua
_detalhes:AddTooltipBackgroundStatusbar()
got_info = true
elseif (got_info) then
GameCooltip:AddLine ("Talents:", Loc ["STRING_QUERY_INSPECT_TALENTS"])
GameCooltip:AddLine (TALENTS .. ":", Loc ["STRING_QUERY_INSPECT_TALENTS"]) --> Loc from GlobalStrings.lua
end
GameCooltip:SetOption ("StatusBarTexture", [[Interface\AddOns\Details\images\bar_skyline]])
GameCooltip:SetOption ("MinButtonHeight", 15)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
GameCooltip:SetOption ("IgnoreButtonAutoHeight", false)
if (not got_info) then
--GameCooltip:AddLine (" ")
--GameCooltip:AddLine ("Click to retrive item level and talents.", nil, 1, "orange")
GameCooltip:AddLine (Loc ["STRING_QUERY_INSPECT"], nil, 1, "orange")
GameCooltip:AddIcon ([[Interface\TUTORIALFRAME\UI-TUTORIAL-FRAME]], 1, 1, 12, icon_size, 8/512, 70/512, 224/512, 306/512)
GameCooltip:SetOption ("FixedHeight", 42)
else
GameCooltip:SetOption ("FixedHeight", 58)
GameCooltip:SetOption ("FixedHeight", 52)
end
--GameCooltip:AddLine ("Class:", LOCALIZED_CLASS_NAMES_MALE [class])
@@ -5641,6 +5637,7 @@ local build_mode_list = function (self, elapsed)
_detalhes:SetMenuOwner (self, instancia)
CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
--CoolTip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetBackdrop (2, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
+15 -3
View File
@@ -628,11 +628,14 @@ local function cria_drop_down (este_gump)
_detalhes:SetFontColor (self.text, "white")
end
window.last_reported_label:SetPoint ("topleft", window, "topleft", 5, -28)
gump:SetFontSize (window.last_reported_label, 10)
for i = 1, 9 do --window.max_last_buttons
local b = window.recently_report_buttons [i]
b:SetSize (150, 16)
b:SetPoint ("topleft", window, "topleft", 10, -12 + (i*17*-1))
b:SetPoint ("topleft", window, "topleft", 5, -28 + (i*17*-1))
b:Show()
b:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}})
@@ -772,11 +775,14 @@ local function cria_drop_down (este_gump)
_detalhes:SetFontColor (self.text, "white")
end
for i = 1, 9 do --window.max_last_buttons
window.last_reported_label:SetPoint ("topleft", window, "topleft", 10, -69)
_detalhes:SetFontSize (window.last_reported_label, 10)
for i = 1, 8 do --window.max_last_buttons
local b = window.recently_report_buttons [i]
b:SetSize (150, 16)
b:SetPoint ("topleft", window, "topleft", 10, -50 + (i*17*-1))
b:SetPoint ("topleft", window, "topleft", 10, -67 + (i*17*-1))
b:Show()
b:SetBackdrop ({bgFile = [[Interface\AddOns\Details\images\background]], tile = true, tileSize = 16,
insets = {left = 0, right = 0, top = 0, bottom = 0}})
@@ -790,6 +796,8 @@ local function cria_drop_down (este_gump)
local b = window.recently_report_buttons [10]
b:Hide()
b = window.recently_report_buttons [9]
b:Hide()
Details_Report_CB_1:Hide()
Details_Report_CB_2:Hide()
@@ -974,6 +982,10 @@ local function cria_drop_down (este_gump)
end
end
local last_reported_label = window:CreateFontString (nil, "overlay", "GameFontNormal")
window.last_reported_label = last_reported_label
window.last_reported_label:SetText (Loc ["STRING_REPORTHISTORY"] .. ":")
for i = 1, window.max_last_buttons do
local b = CreateFrame ("button", "DetailsReportWindowRRB" .. i, window)
local icon = b:CreateTexture (nil, "overlay")
+16 -12
View File
@@ -18,6 +18,7 @@ function _detalhes:OpenWelcomeWindow ()
window = _detalhes:CreateWelcomePanel ("DetailsWelcomeWindow", UIParent)
window:SetPoint ("center", UIParent, "center", -200, 0)
window:SetBackdropColor (0, 0, 0, 0.75)
window:SetWidth (512)
window:SetHeight (265)
window:SetMovable (true)
@@ -26,7 +27,7 @@ function _detalhes:OpenWelcomeWindow ()
window:SetScript ("OnHide", function()
_detalhes.tabela_historico:resetar()
end)
local background = window:CreateTexture (nil, "background")
background:SetPoint ("topleft", window, "topleft")
background:SetPoint ("bottomright", window, "bottomright")
@@ -159,6 +160,9 @@ function _detalhes:OpenWelcomeWindow ()
end
--> overriting the results
_detalhes.update_speed = 0.3
DetailsWelcomeWindowSliderUpdateSpeed.MyObject:SetValue (_detalhes.update_speed)
DetailsWelcomeWindowAnimateSlider.MyObject:SetValue (_detalhes.use_row_animations)
@@ -1145,16 +1149,16 @@ local window_openned_at = time()
window.DpsHpsSlider.tooltip = Loc ["STRING_WELCOME_64"]
--]]
--------------- Max Segments
g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":", "GameFontNormal")
window.segmentsLabel:SetPoint (31, -210)
-- g:NewLabel (window, _, "$parentSliderLabel", "segmentsLabel", Loc ["STRING_WELCOME_21"] .. ":", "GameFontNormal")
-- window.segmentsLabel:SetPoint (31, -210)
--
g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0)
window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
_detalhes.segments_amount = math.floor (amount)
end)
window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
-- g:NewSlider (window, _, "$parentSlider", "segmentsSlider", 120, 20, 1, 25, 1, _detalhes.segments_amount) -- min, max, step, defaultv
-- window.segmentsSlider:SetPoint ("left", window.segmentsLabel, "right", 2, 0)
-- window.segmentsSlider:SetHook ("OnValueChange", function (self, _, amount) --> slider, fixedValue, sliderValue
-- _detalhes.segments_amount = math.floor (amount)
-- end)
-- window.segmentsSlider.tooltip = Loc ["STRING_WELCOME_22"]
--------------
local mech_icon = window:CreateTexture (nil, "overlay")
mech_icon:SetTexture ([[Interface\Vehicles\UI-Vehicles-Endcap-Alliance]])
@@ -1203,8 +1207,8 @@ local window_openned_at = time()
end)
----------------
pages [#pages+1] = {update_frame_alert, mech_icon2, mech_icon, window.segmentsLabel, window.segmentsSlider, bg, texto4, interval_text, dance_text, window.updatespeedLabel, window.updatespeedSlider, window.animateLabel, window.animateSlider, window.changemind4Label, window.DpsHpsLabel, window.DpsHpsSlider}
-- window.segmentsLabel, window.segmentsSlider,
pages [#pages+1] = {update_frame_alert, mech_icon2, mech_icon, bg, texto4, interval_text, dance_text, window.updatespeedLabel, window.updatespeedSlider, window.animateLabel, window.animateSlider, window.changemind4Label, window.DpsHpsLabel, window.DpsHpsSlider}
for _, widget in ipairs (pages[#pages]) do
widget:Hide()