- Added plugin descriptions.

This commit is contained in:
tercio
2014-10-04 14:59:45 -03:00
parent 28de6a9065
commit 374fdb4eec
11 changed files with 111 additions and 40 deletions
+4 -3
View File
File diff suppressed because one or more lines are too long
+40 -27
View File
@@ -1051,35 +1051,48 @@ function atributo_damage:RefreshWindow (instancia, tabela_do_combate, forcar, ex
local qual_barra = 1
local barras_container = instancia.barras --> evita buscar N vezes a key .barras dentro da instância
local percentage_type = instancia.row_info.percent_type
if (not true) then --> follow tests, not working atm.
local myPos = showing._NameIndexTable [_detalhes.playername]
if (myPos) then
--testando
local cima = math.floor (instancia.rows_fit_in_window / 2)
local baixo = math.ceil (instancia.rows_fit_in_window / 2)
if (instancia.rows_fit_in_window % 2 == 0) then
cima = cima - 1
end
cima = math.max (myPos - cima, 1)
baixo = math.min (myPos + baixo, amount)
print (myPos, cima, baixo)
for i = cima, baixo, 1 do --> vai atualizar só o range que esta sendo mostrado
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
end
end
else
if (total == 0) then
total = 0.00000001
end
if (total == 0) then
total = 0.00000001
local myPos = showing._NameIndexTable [_detalhes.playername]
_detalhes.following_type = 0
if (_detalhes.following_type == 1 and myPos and myPos > instancia.rows_fit_in_window) then --> follow tests
--> test
local top, bottom
local cabe_quantas = instancia.rows_fit_in_window
local metade, eh_impar = floor (cabe_quantas / 2), cabe_quantas % 2 > 0
if (eh_impar) then
metade = ceil (metade)
end
local total_actors = amount
local top = math.max (1, myPos-metade) -- 10 - 4 = 6 6 7 8 9 [10] 11 12 13
local bottom = math.max (top + cabe_quantas -1, myPos)
for i = top, bottom, 1 do --> vai atualizar só o range que esta sendo mostrado
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
end
elseif (_detalhes.following_type == 2 and myPos and myPos > instancia.rows_fit_in_window and instancia.barraS[2] < myPos) then --> follow tests
local cabe_quantas = instancia.rows_fit_in_window
for i = instancia.barraS[1], instancia.barraS[2]-1, 1 do --> vai atualizar só o range que esta sendo mostrado
conteudo[i]:AtualizaBarra (instancia, barras_container, qual_barra, i, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
end
conteudo[myPos]:AtualizaBarra (instancia, barras_container, qual_barra, myPos, total, sub_atributo, forcar, keyName, combat_time, percentage_type) --> instância, index, total, valor da 1º barra
qual_barra = qual_barra+1
else
local combat_time = instancia.showing:GetCombatTime()
+7
View File
@@ -30,6 +30,13 @@
end
end
function _detalhes:SetPluginDescription (desc)
self.__description = desc
end
function _detalhes:GetPluginDescription()
return self.__description
end
function _detalhes:CheckDefaultTable (current, default)
for key, value in pairs (default) do
if (type (value) == "table") then
+40 -3
View File
@@ -7608,11 +7608,42 @@ function window:CreateFrame12()
local frame4 = window.options [12][1].gump
local on_enter = function (self)
self:SetBackdropColor (.3, .3, .3, .8)
self:SetBackdropColor (.5, .5, .5, .8)
if (self ["toolbarPluginsIcon" .. self.id]) then
self ["toolbarPluginsIcon" .. self.id]:SetBlendMode ("ADD")
elseif (self ["raidPluginsIcon" .. self.id]) then
self ["raidPluginsIcon" .. self.id]:SetBlendMode ("ADD")
elseif (self ["soloPluginsIcon" .. self.id]) then
self ["soloPluginsIcon" .. self.id]:SetBlendMode ("ADD")
end
if (self.plugin) then
local desc = self.plugin:GetPluginDescription()
if (desc) then
_detalhes:CooltipPreset (2)
GameCooltip:AddLine (desc)
GameCooltip:SetType ("tooltip")
GameCooltip:SetOwner (self, "bottomleft", "topleft", 0, -2)
GameCooltip:Show()
end
end
end
local on_leave = function (self)
self:SetBackdropColor (.3, .3, .3, .3)
if (self ["toolbarPluginsIcon" .. self.id]) then
self ["toolbarPluginsIcon" .. self.id]:SetBlendMode ("BLEND")
elseif (self ["raidPluginsIcon" .. self.id]) then
self ["raidPluginsIcon" .. self.id]:SetBlendMode ("BLEND")
elseif (self ["soloPluginsIcon" .. self.id]) then
self ["soloPluginsIcon" .. self.id]:SetBlendMode ("BLEND")
end
GameCooltip:Hide()
end
local y = -20
@@ -7653,6 +7684,8 @@ function window:CreateFrame12()
bframe:SetBackdropColor (.3, .3, .3, .3)
bframe:SetScript ("OnEnter", on_enter)
bframe:SetScript ("OnLeave", on_leave)
bframe.plugin = pluginObject
bframe.id = i
g:NewImage (bframe, pluginObject.__icon, 18, 18, nil, nil, "toolbarPluginsIcon"..i, "$parentToolbarPluginsIcon"..i)
bframe ["toolbarPluginsIcon"..i]:SetPoint ("topleft", frame4, "topleft", 10, y)
@@ -7733,7 +7766,9 @@ function window:CreateFrame12()
bframe:SetBackdropColor (.3, .3, .3, .3)
bframe:SetScript ("OnEnter", on_enter)
bframe:SetScript ("OnLeave", on_leave)
bframe.plugin = pluginObject
bframe.id = i
g:NewImage (bframe, pluginObject.__icon, 18, 18, nil, nil, "raidPluginsIcon"..i, "$parentRaidPluginsIcon"..i)
bframe ["raidPluginsIcon"..i]:SetPoint ("topleft", frame4, "topleft", 10, y)
@@ -7814,7 +7849,9 @@ function window:CreateFrame12()
bframe:SetBackdropColor (.3, .3, .3, .3)
bframe:SetScript ("OnEnter", on_enter)
bframe:SetScript ("OnLeave", on_leave)
bframe.plugin = pluginObject
bframe.id = i
g:NewImage (bframe, pluginObject.__icon, 18, 18, nil, nil, "soloPluginsIcon"..i, "$parentSoloPluginsIcon"..i)
bframe ["soloPluginsIcon"..i]:SetPoint ("topleft", frame4, "topleft", 10, y)
+2 -1
View File
@@ -15,6 +15,7 @@ local DmgRank = _detalhes:NewPluginObject ("Details_DmgRank")
--> Main Frame
local DmgRankFrame = DmgRank.Frame
DmgRank:SetPluginDescription ("A plugin for you have fun with a training dummy testing your damage skill and gear, leveling through many challenges.")
--> this function will run when the plugin receives the Addon_Loaded event, ["data"] = previus saved player rank
local function CreatePluginFrames (data)
@@ -549,7 +550,7 @@ function DmgRank:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install plugin inside details
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\ACHIEVEMENT_GUILDPERK_HONORABLEMENTION_RANK2", DmgRank, "DETAILS_PLUGIN_DAMAGE_RANK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.09")
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\ACHIEVEMENT_GUILDPERK_HONORABLEMENTION_RANK2", DmgRank, "DETAILS_PLUGIN_DAMAGE_RANK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.1.1")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -18,6 +18,8 @@ local GetTime = GetTime --> wow api local
local _GetSpellInfo =_detalhes.getspellinfo --> details api local
DpsTuningPlugin:SetPluginDescription ("Tool for testing your Dps showing detailed information for each spell, buffs and also graphical charts for abilities.")
local function CreatePluginFrames()
--> get the framework
@@ -1172,7 +1174,7 @@ function DpsTuningPlugin:OnEvent (_, event, ...)
}
--> Install plugin inside details
local install = _G._detalhes:InstallPlugin ("SOLO", "Dps Tuning", "Interface\\Icons\\Ability_Racial_RocketBarrage", DpsTuningPlugin, "DETAILS_PLUGIN_DPS_TUNING", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.00", default_settings)
local install = _G._detalhes:InstallPlugin ("SOLO", "Dps Tuning", "Interface\\Icons\\Ability_Racial_RocketBarrage", DpsTuningPlugin, "DETAILS_PLUGIN_DPS_TUNING", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.01", default_settings)
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -29,6 +29,8 @@ 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..")
--> container types
local class_type_damage = _detalhes.atributos.dano --> damage
local class_type_misc = _detalhes.atributos.misc --> misc
@@ -1558,7 +1560,7 @@ function EncounterDetails:OnEvent (_, event, ...)
local PLUGIN_REAL_NAME = "DETAILS_PLUGIN_ENCOUNTER_DETAILS"
local PLUGIN_ICON = [[Interface\Scenarios\ScenarioIcon-Boss]]
local PLUGIN_AUTHOR = "Details! Team"
local PLUGIN_VERSION = "v1.05"
local PLUGIN_VERSION = "v1.06"
local default_settings = {
show_icon = 5, --automatic
@@ -15,6 +15,8 @@ local TimeAttack = _detalhes:NewPluginObject ("Details_TimeAttack")
--> Main Frame
local TimeAttackFrame = TimeAttack.Frame
TimeAttack:SetPluginDescription ("Special tool for measure damage within a period of time.\n\nYou can save the attempts and try again other time when you got new gear or changed the specialization.")
local function CreatePluginFrames()
--> catch Details! main object
@@ -1144,7 +1146,7 @@ function TimeAttack:OnEvent (_, event, ...)
end
--> Install
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.04", default_settings)
local install, saveddata = _G._detalhes:InstallPlugin ("SOLO", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\SPELL_HOLY_BORROWEDTIME", TimeAttack, "DETAILS_PLUGIN_TIME_ATTACK", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.05", default_settings)
if (type (install) == "table" and install.error) then
print (install.errortext)
return
@@ -24,6 +24,8 @@ local ThreatMeter = _detalhes:NewPluginObject ("Details_Threat")
--> Main Frame
local ThreatMeterFrame = ThreatMeter.Frame
ThreatMeter:SetPluginDescription ("Small tool for track the threat you and other raid members have in your current target.")
local _
local function CreatePluginFrames (data)
@@ -600,7 +602,7 @@ function ThreatMeter:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.05")
local install, saveddata = _G._detalhes:InstallPlugin ("RAID", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\Ability_Paladin_ShieldofVengeance", ThreatMeter, "DETAILS_PLUGIN_TINY_THREAT", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.06")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -29,6 +29,8 @@ local Vanguard = _detalhes:NewPluginObject ("Details_Vanguard")
--> Main Frame
local VanguardFrame = Vanguard.Frame
Vanguard:SetPluginDescription ("Show debuffs on each tanks in the raid, also shows incoming heal and damage and the last hits you took.")
--> Create plugin objects, function and widgets
local function CreatePluginFrames (data)
@@ -1247,7 +1249,7 @@ function Vanguard:OnEvent (_, event, ...)
local MINIMAL_DETAILS_VERSION_REQUIRED = 1
--> Install
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.06")
local install = _G._detalhes:InstallPlugin ("TANK", Loc ["STRING_PLUGIN_NAME"], "Interface\\Icons\\INV_Shield_77", Vanguard, "DETAILS_PLUGIN_VANGUARD", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.07")
if (type (install) == "table" and install.error) then
print (install.error)
end
@@ -9,6 +9,8 @@
--> main frame (shortcut)
local YouAreNotPreparedFrame = YouAreNotPrepared.Frame
YouAreNotPrepared:SetPluginDescription ("Tracks your deaths during raid encounters and shows it for you right after the fight end.")
local debugmode = false
@@ -569,7 +571,7 @@
}
--> install
local install, saveddata, is_enabled = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], [[Interface\ICONS\Achievement_Boss_Illidan]], YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.1", default_settings)
local install, saveddata, is_enabled = _G._detalhes:InstallPlugin ("TOOLBAR", Loc ["STRING_PLUGIN_NAME"], [[Interface\ICONS\Achievement_Boss_Illidan]], YouAreNotPrepared, "DETAILS_PLUGIN_YANP", MINIMAL_DETAILS_VERSION_REQUIRED, "Details! Team", "v1.1.2", default_settings)
if (type (install) == "table" and install.error) then
return print (install.error)
end