- Some improvements on Plugin's icon at the title bar.
This commit is contained in:
@@ -2526,6 +2526,8 @@ function _detalhes:MontaAtributosOption (instancia, func)
|
||||
|
||||
CoolTip:SetOption ("TextFont", _detalhes.font_faces.menus)
|
||||
|
||||
_detalhes:SetTooltipMinWidth()
|
||||
|
||||
local last_selected = atributo_ativo
|
||||
if (atributo_ativo == 5) then
|
||||
last_selected = 6
|
||||
|
||||
+5
-2
@@ -8,7 +8,7 @@
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> details api functions
|
||||
function _detalhes:GetPlugin (PAN) --plugin absolute name
|
||||
return _detalhes.SoloTables.NameTable [PAN] or _detalhes.RaidTables.NameTable [PAN] or _detalhes.ToolBar.NameTable [PAN] or _detalhes.StatusBar.NameTable [PAN]
|
||||
return _detalhes.SoloTables.NameTable [PAN] or _detalhes.RaidTables.NameTable [PAN] or _detalhes.ToolBar.NameTable [PAN] or _detalhes.StatusBar.NameTable [PAN] or _detalhes.PluginsLocalizedNames [PAN] or _detalhes.PluginsGlobalNames [PAN]
|
||||
end
|
||||
|
||||
function _detalhes:GetPluginSavedTable (PluginAbsoluteName)
|
||||
@@ -61,7 +61,7 @@
|
||||
self.__description = desc
|
||||
end
|
||||
function _detalhes:GetPluginDescription()
|
||||
return self.__description
|
||||
return self.__description or ""
|
||||
end
|
||||
|
||||
function _detalhes:DisablePlugin (AbsoluteName)
|
||||
@@ -139,6 +139,9 @@
|
||||
PluginObject.__icon = PluginIcon or [[Interface\ICONS\Trade_Engineering]]
|
||||
PluginObject.real_name = PluginAbsoluteName
|
||||
|
||||
_detalhes.PluginsGlobalNames [PluginAbsoluteName] = PluginObject
|
||||
_detalhes.PluginsLocalizedNames [PluginName] = PluginObject
|
||||
|
||||
local saved_table
|
||||
|
||||
if (PluginType ~= "STATUSBAR") then
|
||||
|
||||
+51
-21
@@ -1,8 +1,3 @@
|
||||
--File Revision: 1
|
||||
--Last Modification: 27/07/2013
|
||||
-- Change Log:
|
||||
-- 27/07/2013: Finished alpha version.
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
local _detalhes = _G._detalhes
|
||||
@@ -26,7 +21,6 @@
|
||||
|
||||
--> create button from template
|
||||
local button = CreateFrame ("button", framename, _detalhes.listener, "DetailsToolbarButton")
|
||||
--button:SetScript ("OnHide", function (self) print (debugstack()) end)
|
||||
|
||||
--> sizes
|
||||
if (w) then
|
||||
@@ -42,8 +36,6 @@
|
||||
--> tooltip and function on click
|
||||
button.tooltip = tooltip
|
||||
button:SetScript ("OnClick", func)
|
||||
|
||||
--print ("ED button 2:", ENCOUNTERDETAILS_BUTTON:GetAlpha(), ENCOUNTERDETAILS_BUTTON:IsShown())
|
||||
|
||||
--> textures
|
||||
button:SetNormalTexture (icon)
|
||||
@@ -137,6 +129,31 @@
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
--> internal functions
|
||||
do
|
||||
local PluginDescPanel = CreateFrame ("frame", "DetailsPluginDescPanel", UIParent)
|
||||
PluginDescPanel:SetFrameStrata ("tooltip")
|
||||
PluginDescPanel:Hide()
|
||||
PluginDescPanel:SetWidth (205)
|
||||
PluginDescPanel.BackdropTable = {}
|
||||
|
||||
local background = PluginDescPanel:CreateTexture (nil, "artwork")
|
||||
background:SetPoint ("topleft", 0, 0)
|
||||
background:SetPoint ("bottomright", 0, 0)
|
||||
PluginDescPanel.background = background
|
||||
|
||||
local icon, title, desc = PluginDescPanel:CreateTexture (nil, "overlay"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal"), PluginDescPanel:CreateFontString (nil, "overlay", "GameFontNormal")
|
||||
icon:SetPoint ("topleft", 10, -10)
|
||||
icon:SetSize (16, 16)
|
||||
title:SetPoint ("left", icon, "right", 2, 0)
|
||||
desc:SetPoint ("topleft", 13, -30)
|
||||
desc:SetWidth (180)
|
||||
desc:SetJustifyH ("left")
|
||||
_detalhes:SetFontColor (desc, "white")
|
||||
|
||||
PluginDescPanel.icon = icon
|
||||
PluginDescPanel.title = title
|
||||
PluginDescPanel.desc = desc
|
||||
end
|
||||
|
||||
--[[global]] function DetailsToolbarButtonOnEnter (button)
|
||||
|
||||
@@ -146,22 +163,35 @@
|
||||
end
|
||||
|
||||
if (button.tooltip) then
|
||||
|
||||
GameCooltip:Reset()
|
||||
GameCooltip:Hide()
|
||||
local plugin_object = _detalhes:GetPlugin (button.__name)
|
||||
|
||||
--GameCooltip:SetOption ("FixedWidth", 200)
|
||||
GameCooltip:SetOption ("ButtonsYMod", -3)
|
||||
GameCooltip:SetOption ("YSpacingMod", -3)
|
||||
GameCooltip:SetOption ("IgnoreButtonAutoHeight", true)
|
||||
GameCooltip:SetColor (1, 0.5, 0.5, 0.5, 0.5)
|
||||
local f = DetailsPluginDescPanel
|
||||
f.icon:SetTexture (button.__icon)
|
||||
f.title:SetText (button.__name)
|
||||
f.desc:SetText (plugin_object:GetPluginDescription())
|
||||
_detalhes:SetFontSize (f.desc, _detalhes.font_sizes.menus)
|
||||
_detalhes:SetFontFace (f.desc, _detalhes.font_faces.menus)
|
||||
|
||||
GameCooltip:SetBackdrop (1, _detalhes.tooltip_backdrop, nil, _detalhes.tooltip_border_color)
|
||||
f.background:SetTexture (_detalhes.tooltip.menus_bg_texture)
|
||||
f.background:SetTexCoord (unpack (_detalhes.tooltip.menus_bg_coords))
|
||||
f.background:SetVertexColor (unpack (_detalhes.tooltip.menus_bg_color))
|
||||
f.background:SetDesaturated (true)
|
||||
|
||||
--[[title]] GameCooltip:AddLine (button.__name, nil, 1, "orange", nil, 12, SharedMedia:Fetch ("font", "Friz Quadrata TT"))
|
||||
GameCooltip:AddIcon (button.__icon, 1, 1, 16, 16)
|
||||
----[[desc]] GameCooltip:AddLine (button.tooltip)
|
||||
f.BackdropTable.bgFile = _detalhes.tooltip_backdrop.bgFile
|
||||
f.BackdropTable.edgeFile = _detalhes.tooltip_backdrop.edgeFile
|
||||
f.BackdropTable.tile = _detalhes.tooltip_backdrop.tile
|
||||
f.BackdropTable.edgeSize = _detalhes.tooltip_backdrop.edgeSize
|
||||
f.BackdropTable.tileSize = _detalhes.tooltip_backdrop.tileSize
|
||||
|
||||
GameCooltip:ShowCooltip (button, "tooltip")
|
||||
f:SetBackdrop (f.BackdropTable)
|
||||
local r, g, b, a = _detalhes.gump:ParseColors (_detalhes.tooltip_border_color)
|
||||
f:SetBackdropBorderColor (r, g, b, a)
|
||||
|
||||
f:SetHeight (40 + f.desc:GetStringHeight())
|
||||
f:SetPoint ("bottom", button, "top", 0, 5)
|
||||
f:Show()
|
||||
--SharedMedia:Fetch ("font", "Friz Quadrata TT")
|
||||
end
|
||||
end
|
||||
--[[global]] function DetailsToolbarButtonOnLeave (button)
|
||||
@@ -172,7 +202,7 @@
|
||||
end
|
||||
|
||||
if (button.tooltip) then
|
||||
_detalhes.popup:ShowMe (false)
|
||||
DetailsPluginDescPanel:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -5424,6 +5424,11 @@ local OnClickNovoMenu = function (_, _, id, instance)
|
||||
end
|
||||
end
|
||||
|
||||
function _detalhes:SetTooltipMinWidth()
|
||||
GameCooltip:SetOption ("MinWidth", 140)
|
||||
-- /dump GameCooltipFrame1:GetWidth()
|
||||
end
|
||||
|
||||
local build_mode_list = function (self, elapsed)
|
||||
|
||||
local CoolTip = GameCooltip
|
||||
@@ -5452,6 +5457,8 @@ local build_mode_list = function (self, elapsed)
|
||||
|
||||
CoolTip:SetOption ("HeighMod", 10)
|
||||
|
||||
_detalhes:SetTooltipMinWidth()
|
||||
|
||||
--CoolTip:SetOption ("FixedHeight", 106)
|
||||
--CoolTip:SetOption ("FixedWidthSub", 146)
|
||||
|
||||
@@ -6117,6 +6124,9 @@ local build_segment_list = function (self, elapsed)
|
||||
CoolTip:SetOption ("YSpacingModSub", -4)
|
||||
|
||||
CoolTip:SetOption ("HeighMod", 12)
|
||||
_detalhes:SetTooltipMinWidth()
|
||||
|
||||
|
||||
|
||||
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, _detalhes.tooltip.menus_bg_coords, _detalhes.tooltip.menus_bg_color, true)
|
||||
--CoolTip:SetWallpaper (1, _detalhes.tooltip.menus_bg_texture, {66/512, 1, 78/512, 435/512}, _detalhes.tooltip.menus_bg_color, true)
|
||||
@@ -7605,6 +7615,8 @@ end
|
||||
GameCooltip:SetOption ("ButtonsYMod", -7)
|
||||
GameCooltip:SetOption ("HeighMod", 8)
|
||||
|
||||
_detalhes:SetTooltipMinWidth()
|
||||
|
||||
GameCooltip:AddLine (Loc ["STRING_ERASE_DATA"], nil, 1, "white", nil, _detalhes.font_sizes.menus, _detalhes.font_faces.menus)
|
||||
GameCooltip:AddIcon ([[Interface\Buttons\UI-StopButton]], 1, 1, 14, 14, 0, 1, 0, 1, "red")
|
||||
GameCooltip:AddMenu (1, _detalhes.tabela_historico.resetar)
|
||||
@@ -7780,6 +7792,8 @@ local report_on_enter = function (self, motion, forced, from_click)
|
||||
GameCooltip:SetOption ("ButtonsYMod", -7)
|
||||
GameCooltip:SetOption ("HeighMod", 8)
|
||||
|
||||
_detalhes:SetTooltipMinWidth()
|
||||
|
||||
_detalhes:CheckLastReportsIntegrity()
|
||||
|
||||
local last_reports = _detalhes.latest_report_table
|
||||
|
||||
@@ -30,7 +30,7 @@ tinsert (UISpecialFrames, "Details_EncounterDetails")
|
||||
--> Main Frame
|
||||
local EncounterDetailsFrame = EncounterDetails.Frame
|
||||
|
||||
EncounterDetails:SetPluginDescription ("Shows a summary for raid encounters containing dispels, interrupts, deaths, damage taken, graphic raid damage and more..")
|
||||
EncounterDetails:SetPluginDescription ("Raid encounters summary, show basic stuff like dispels, interrupts and also graphic charts, boss emotes and the Weakaura Creation Tool.")
|
||||
|
||||
--> container types
|
||||
local class_type_damage = _detalhes.atributos.dano --> damage
|
||||
|
||||
Reference in New Issue
Block a user