Streamer Plugin updated to Dragonflight

This commit is contained in:
Tercio Jose
2022-09-15 13:50:22 -03:00
parent e20cee2303
commit b58853ff06
15 changed files with 240 additions and 65 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
_detalhes.BFACORE = 131 --core version on BFA launch
_detalhes.SHADOWLANDSCORE = 143 --core version on Shadowlands launch
--
_detalhes.dragonflight_beta_version = 30
_detalhes.dragonflight_beta_version = 31
Details = _detalhes
@@ -1022,4 +1022,4 @@ if (select(4, GetBuildInfo()) >= 100000) then
StaticPopup1.button2:Click()
end
end)
end
end
@@ -0,0 +1,9 @@
## Interface: 20504
## Title: Details!: Storage
## Notes: Stores information for Details! Damage Meter
## DefaultState: Enabled
## LoadOnDemand: 1
## Dependencies: Details
## SavedVariables: DetailsDataStorage
Details_DataStorage.lua
@@ -0,0 +1,9 @@
## Interface: 30400
## Title: Details!: Storage
## Notes: Stores information for Details! Damage Meter
## DefaultState: Enabled
## LoadOnDemand: 1
## Dependencies: Details
## SavedVariables: DetailsDataStorage
Details_DataStorage.lua
@@ -0,0 +1,17 @@
## Interface: 20504
## Title: Details!: Encounter Breakdown (plugin)
## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation.
## RequiredDeps: Details
## OptionalDeps: Ace3
## SavedVariablesPerCharacter: EncounterDetailsDB
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
frames.lua
Details_EncounterDetails.lua
@@ -0,0 +1,17 @@
## Interface: 30400
## Title: Details!: Encounter Breakdown (plugin)
## Notes: Show detailed information about a boss encounter. Also provide damage per phase, graphic charts, easy weakauras creation.
## RequiredDeps: Details
## OptionalDeps: Ace3
## SavedVariablesPerCharacter: EncounterDetailsDB
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
frames.lua
Details_EncounterDetails.lua
@@ -0,0 +1,10 @@
## Interface: 20504
## Title: Details!: Raid Check (plugin)
## Notes: Show talents and item level for all members in your group, also shows food and flask state.
## RequiredDeps: Details
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_RaidCheck.lua
@@ -0,0 +1,10 @@
## Interface: 30400
## Title: Details!: Raid Check (plugin)
## Notes: Show talents and item level for all members in your group, also shows food and flask state.
## RequiredDeps: Details
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_RaidCheck.lua
@@ -0,0 +1,11 @@
## Interface: 20504
## Title: Details!: Streamer (plugin)
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
## RequiredDeps: Details
## SavedVariables: Details_StreamerDB
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_Streamer.lua
@@ -0,0 +1,11 @@
## Interface: 30400
## Title: Details!: Streamer (plugin)
## Notes: Show which spells you are casting, viewers can see what are you doing and follow your steps.
## RequiredDeps: Details
## SavedVariables: Details_StreamerDB
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_Streamer.lua
+78 -63
View File
@@ -213,12 +213,7 @@ local function CreatePluginFrames()
SOF:SetResizable (true)
SOF:SetClampedToScreen (true)
if (not DetailsFramework.IsDragonflight()) then
SOF:SetMinResize (150, 10)
SOF:SetMaxResize (800, 1024)
else
--SOF:SetResizeBounds(150, 10, 800, 1024)
end
SOF:SetResizeBounds(150, 10, 800, 1024)
function StreamOverlay:SaveWindowSizeAnLocation()
--> save size first
@@ -539,12 +534,12 @@ local function CreatePluginFrames()
end
if (castinfo.Success) then
line.spark:SetVertexColor (1, 1, 1, 0.4)
line.spark:SetPoint ("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 8, 0)
line.spark:SetVertexColor(1, 1, 1, 0.4)
line.spark:SetPoint("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 8, 0)
elseif (castinfo.Interrupted) then
line.spark:SetVertexColor (1, 0, 0, 0.4)
line.spark:SetPoint ("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 8, 0)
line.spark:SetVertexColor(1, 0, 0, 0.4)
line.spark:SetPoint("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 8, 0)
end
line.in_use = data.CastStart
@@ -710,24 +705,23 @@ local function CreatePluginFrames()
row.arrow:Show()
end
local texture = SharedMedia:Fetch ("statusbar", StreamOverlay.db.row_texture)
row.statusbar_texture:SetTexture (texture)
row.statusbar_texture:SetVertexColor (unpack (StreamOverlay.db.row_color))
row.arrow:SetTexture (StreamOverlay.db.arrow_texture)
row.arrow:SetSize (StreamOverlay.db.arrow_size, StreamOverlay.db.arrow_size)
row.arrow:SetVertexColor (unpack (StreamOverlay.db.arrow_color))
row.arrow:SetPoint ("center", row, "center", StreamOverlay.db.arrow_anchor_x, StreamOverlay.db.arrow_anchor_y)
local texture = SharedMedia:Fetch("statusbar", StreamOverlay.db.row_texture)
row.statusbar_texture:SetTexture(texture)
row.statusbar_texture:SetVertexColor(unpack(StreamOverlay.db.row_color))
row.arrow:SetTexture(StreamOverlay.db.arrow_texture)
row.arrow:SetSize(StreamOverlay.db.arrow_size, StreamOverlay.db.arrow_size)
row.arrow:SetVertexColor(unpack(StreamOverlay.db.arrow_color))
row.arrow:SetPoint("center", row, "center", StreamOverlay.db.arrow_anchor_x, StreamOverlay.db.arrow_anchor_y)
end
function StreamOverlay:RefreshInUse (line)
function StreamOverlay:RefreshInUse(line)
local now = GetTime()
local i = -1 --was nil before from _G["i"]
local i = -1 --was nil before from _G["i"]
if (line) then
local line_in_use = line.in_use or 1
local content_in_use = StreamOverlay.battle_content [i] and StreamOverlay.battle_content [i].CastStart or 1
if (max (line_in_use, content_in_use) + 60 < now) then
fader (nil, line, "in")
else
@@ -1128,14 +1122,14 @@ listener.track_spell_cast = function()
else
line.spark:Hide()
end
line.spark:SetVertexColor (1, 1, 1, 0.5 + (percent/100))
line.spark:SetVertexColor (1, 1, 1, 1)
line.spark:SetPoint ("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
line.spark:SetVertexColor(1, 1, 1, 1)
line.spark:SetPoint("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
end
else
--> still casting
local spell, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo ("player")
local spell, displayName, icon, startTime, endTime, isTradeSkill, castID, interrupt = UnitCastingInfo("player")
if (spell) then
startTime = startTime / 1000
endTime = endTime / 1000
@@ -1151,8 +1145,8 @@ listener.track_spell_cast = function()
else
line.spark:Hide()
end
line.spark:SetVertexColor (1, 1, 1, 0.5 + (percent/100))
line.spark:SetPoint ("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
line.spark:SetVertexColor(1, 1, 1, 1)
line.spark:SetPoint("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
end
end
@@ -1181,7 +1175,7 @@ listener.track_spell_cast = function()
line.spark:Hide()
end
line.spark:SetVertexColor (1, 1, 1, 0.5 + (percent/100))
line.spark:SetVertexColor (1, 1, 1, 1)
line.spark:SetPoint ("left", line.statusbar, "left", (line.statusbar:GetWidth() / 100 * percent) - 6, 0)
end
end
@@ -1673,26 +1667,35 @@ end
function StreamOverlay.OpenOptionsPanel (from_options_panel)
if (not StreamOverlayOptionsPanel) then
local fw = Details:GetFramework()
local options_text_template = fw:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE")
local options_dropdown_template = fw:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE")
local options_switch_template = fw:GetTemplate ("switch", "OPTIONS_CHECKBOX_TEMPLATE")
local options_slider_template = fw:GetTemplate ("slider", "OPTIONS_SLIDER_TEMPLATE")
local options_button_template = fw:GetTemplate ("button", "OPTIONS_BUTTON_TEMPLATE")
local options_frame = StreamOverlay:CreatePluginOptionsFrame ("StreamOverlayOptionsPanel", "Details! Streamer: Action Tracker", 1)
options_frame:SetBackdrop ({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
options_frame:SetBackdropColor (0, 0, 0, 0.5)
options_frame:SetBackdropBorderColor (0, 0, 0, 1)
options_frame:SetWidth (520)
options_frame:SetHeight (625)
local selectModeFrame = CreateFrame("frame", nil, options_frame, "BackdropTemplate")
local optionsFrame = StreamOverlay:CreatePluginOptionsFrame("StreamOverlayOptionsPanel", "Details! Streamer: Action Tracker", 1)
optionsFrame:SetBackdrop({edgeFile = [[Interface\Buttons\WHITE8X8]], edgeSize = 1, bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], tileSize = 64, tile = true})
optionsFrame:SetBackdropColor(0, 0, 0, 0.5)
optionsFrame:SetBackdropBorderColor(0, 0, 0, 1)
optionsFrame:SetWidth(530)
optionsFrame:SetHeight(655)
local statusBar = DetailsFramework:CreateStatusBar(optionsFrame)
statusBar.text = statusBar:CreateFontString(nil, "overlay", "GameFontNormal")
statusBar.text:SetPoint("left", statusBar, "left", 5, 0)
statusBar.text:SetText("By Terciob | From Details! Damage Meter Streamer Plugin")
DetailsFramework:SetFontSize(statusBar.text, 11)
DetailsFramework:SetFontColor(statusBar.text, "gray")
StreamOverlayOptionsPanelBackgroundBigDog:ClearAllPoints()
StreamOverlayOptionsPanelBackgroundBigDog:SetPoint("bottomright", statusBar, "topright", 0, 0)
local selectModeFrame = CreateFrame("frame", nil, optionsFrame, "BackdropTemplate")
DetailsFramework:ApplyStandardBackdrop(selectModeFrame)
selectModeFrame:SetPoint("topleft", options_frame, "topleft", 5, -95)
selectModeFrame:SetSize(options_frame:GetWidth()-10, 120)
selectModeFrame:SetPoint("topleft", optionsFrame, "topleft", 5, -95)
selectModeFrame:SetSize(optionsFrame:GetWidth()-10, 120)
local selectedFrame = CreateFrame("frame", nil, selectModeFrame, "BackdropTemplate")
selectedFrame:SetSize(260, 81)
@@ -1714,10 +1717,10 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
end
local selectModeLabel = DetailsFramework:CreateLabel(selectModeFrame, "Select Mode (test casting some spells)", 14, "orange")
selectModeLabel:SetPoint("top", options_frame, "top", 0, -100)
selectModeLabel:SetPoint("top", optionsFrame, "top", 0, -100)
local classicModeSelectButton = DetailsFramework:CreateButton(selectModeFrame, selectClassicMode, 256, 77, "")
classicModeSelectButton:SetPoint("topleft", options_frame, "topleft", 15, -120)
classicModeSelectButton:SetPoint("topleft", optionsFrame, "topleft", 15, -120)
local classicModeTexture = classicModeSelectButton:CreateTexture(nil, "overlay")
classicModeTexture:SetTexture([[Interface\Addons\Details_Streamer\images\tracker_full]])
classicModeTexture:SetAllPoints()
@@ -1855,9 +1858,21 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
desc = "Color used on the background.",
name = "Background Color"
},
{type = "space"},
{
type = "range",
get = function() return StreamOverlay.db.scale or 1 end,
set = function (self, fixedparam, value) StreamOverlay.db.scale = value; StreamOverlay.Frame:SetScale(value) end,
min = 0.6,
max = 2,
step = 0.1,
desc = "Scale",
name = "Scale",
usedecimals = true,
},
{type = "blank"},
{
type = "range",
get = function() return StreamOverlay.db.row_height end,
@@ -2145,7 +2160,7 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
}
fw:BuildMenu (options_frame, options, 15, -235, 860, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
fw:BuildMenu (optionsFrame, options, 15, -235, 860, true, options_text_template, options_dropdown_template, options_switch_template, true, options_slider_template, options_button_template)
--select profile dropdown
local select_profile = function (_, _, profileName)
@@ -2181,7 +2196,7 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
StreamOverlay:RefreshAllBattleLineStyle()
--> update the options panel
options_frame:RefreshOptions()
optionsFrame:RefreshOptions()
end
local select_profile_fill = function()
@@ -2192,10 +2207,10 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
return t
end
local label_profile = Details.gump:CreateLabel (options_frame, "Profile" .. ": ", Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local dropdown_profile = Details.gump:CreateDropDown (options_frame, select_profile_fill, nil, 160, 20, "dropdown_profile", nil, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
local label_profile = Details.gump:CreateLabel (optionsFrame, "Profile" .. ": ", Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
local dropdown_profile = Details.gump:CreateDropDown (optionsFrame, select_profile_fill, nil, 160, 20, "dropdown_profile", nil, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"))
dropdown_profile:SetPoint ("left", label_profile, "right", 2, 0)
label_profile:SetPoint ("topleft", options_frame, "topleft", 15, -65)
label_profile:SetPoint ("topleft", optionsFrame, "topleft", 15, -65)
local pname = UnitName ("player") .. " - " .. GetRealmName()
dropdown_profile:Select (Details_StreamerDB.characters [pname])
@@ -2213,18 +2228,18 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
_detalhes.table.deploy (Details_StreamerDB.profiles [pname], StreamOverlay.DefaultConfigTable) --update with any new config from the default table
--StreamOverlay.db = Details_StreamerDB.profiles [pname] --no can't change the local database table
options_frame.NewProfileButton:Hide()
optionsFrame.NewProfileButton:Hide()
--> update all settings
StreamOverlay:RefreshAllBattleLineStyle()
--> update the options panel
options_frame:RefreshOptions()
optionsFrame:RefreshOptions()
dropdown_profile:Select (Details_StreamerDB.characters [pname])
end
options_frame.NewProfileButton = Details.gump:CreateButton (options_frame, add_profile, 60, 18, "New Profiile", _, _, _, _, _, _, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"), Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
options_frame.NewProfileButton:SetPoint ("left", dropdown_profile, "right", 4, 0)
optionsFrame.NewProfileButton = Details.gump:CreateButton (optionsFrame, add_profile, 60, 18, "New Profiile", _, _, _, _, _, _, Details.gump:GetTemplate ("dropdown", "OPTIONS_DROPDOWN_TEMPLATE"), Details.gump:GetTemplate ("font", "OPTIONS_FONT_TEMPLATE"))
optionsFrame.NewProfileButton:SetPoint ("left", dropdown_profile, "right", 4, 0)
end
--enable / disable plugin button
@@ -2236,26 +2251,26 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
pluginStable.enabled = false
pluginObject.__enabled = false
Details:SendEvent("PLUGIN_DISABLED", pluginObject)
options_frame.toggleButton.text = "Start Plugin"
optionsFrame.toggleButton.text = "Start Plugin"
else
pluginStable.enabled = true
pluginObject.__enabled = true
Details:SendEvent("PLUGIN_ENABLED", pluginObject)
options_frame.toggleButton.text = "Disable Plugin"
optionsFrame.toggleButton.text = "Disable Plugin"
end
end
--get the plugin state
local pluginStable = Details:GetPluginSavedTable("DETAILS_PLUGIN_STREAM_OVERLAY")
local toggleButton = DetailsFramework:CreateButton(options_frame, toggle_OnOff, 120, 20, pluginStable.enabled and "Disable Plugin" or "Start Plugin")
toggleButton:SetPoint ("topleft", options_frame, "topleft", 15, -35)
local toggleButton = DetailsFramework:CreateButton(optionsFrame, toggle_OnOff, 120, 20, pluginStable.enabled and "Disable Plugin" or "Start Plugin")
toggleButton:SetPoint ("topleft", optionsFrame, "topleft", 15, -35)
toggleButton:SetTemplate(DetailsFramework:GetTemplate("button", "OPTIONS_BUTTON_TEMPLATE"))
options_frame.toggleButton = toggleButton
optionsFrame.toggleButton = toggleButton
options_frame:SetScript ("OnHide", function()
optionsFrame:SetScript ("OnHide", function()
if (StreamOverlay.FromOptionsPanel) then
--> reopen the options panel
C_Timer.After (0.2, function()
@@ -2264,7 +2279,7 @@ function StreamOverlay.OpenOptionsPanel (from_options_panel)
end
end)
options_frame:SetScript("OnShow", function()
optionsFrame:SetScript("OnShow", function()
local pluginStable = Details:GetPluginSavedTable("DETAILS_PLUGIN_STREAM_OVERLAY")
local pluginObject = Details:GetPlugin("DETAILS_PLUGIN_STREAM_OVERLAY")
@@ -0,0 +1,14 @@
## Interface: 20504
## Title: Details!: Tiny Threat (plugin)
## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel.
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_TinyThreat.lua
@@ -0,0 +1,14 @@
## Interface: 11401
## Title: Details!: Tiny Threat (plugin)
## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel.
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_TinyThreat.lua
@@ -0,0 +1,14 @@
## Interface: 30400
## Title: Details!: Tiny Threat (plugin)
## Notes: Threat meter plugin, show threat for group members in the window. Select it from the Plugin menu in the Orange Cogwheel.
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
enUS.lua
ptBR.lua
Details_TinyThreat.lua
@@ -0,0 +1,12 @@
## Interface: 20504
## Title: Details!: Vanguard (plugin)
## Notes: Show the health and debuffs for tanks in your group.
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_Vanguard.lua
@@ -0,0 +1,12 @@
## Interface: 30400
## Title: Details!: Vanguard (plugin)
## Notes: Show the health and debuffs for tanks in your group.
## SavedVariablesPerCharacter: _detalhes_databaseVanguard
## RequiredDeps: Details
## OptionalDeps: Ace3
#@no-lib-strip@
embeds.xml
#@end-no-lib-strip@
Details_Vanguard.lua