Skip to content

Commit

Permalink
- Framework update.
Browse files Browse the repository at this point in the history
- Added Plater.SetExecuteRange (isEnabled, range).
  • Loading branch information
Tercioo authored and Tercioo committed Feb 12, 2019
1 parent 591c822 commit 731b178
Show file tree
Hide file tree
Showing 8 changed files with 149 additions and 87 deletions.
185 changes: 101 additions & 84 deletions Plater.lua

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions Plater_ChangeLog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ local _
function Plater.GetChangelogTable()
if (not Plater.ChangeLogTable) then
Plater.ChangeLogTable = {
{1550006686, "Buf Fix", "February 12, 2019", "Fixed cast bar border sometimes showing as white color above the spell name cast."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed border color by aggro reported to not be working correctly as it should."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed health animation and color transition animations."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed health percent text calling :Show() every time the health gets an update."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed resource anchor not correctly adjusting its offset when the personal health bar isn't shown."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed the neutral nameplate color."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed the channeling color sometimes using the finished cast color."},
{1550006686, "Buf Fix", "February 12, 2019", "Fixed hook script load conditions not showing reaping affix."},
{1550006686, "Scripting", "February 12, 2019", "Added Plater.GetConfig (unitFrame) for scripts to have access to the nameplate settings."},
{1550006686, "Scripting", "February 12, 2019", "Added Plater:GetPlayerRole() which returns the name of the current role the player is in (TANK DAMAGER, HEALER, NONE)."},
{1550006686, "Scripting", "February 12, 2019", "Added option 'Offset if Buff is Shown' for resource at the Personal Bar tab."},
{1550006686, "Scripting", "February 12, 2019", "Added 'M+ Bwonsamdi Reaping' hook script for the mobs from the affix without aggro tables."},
{1550006686, "Scripting", "February 12, 2019", "Added 'Dont Have Aura' hook script."},

{1548612692, "New Feature", "January 27, 2019", "Added an option to test cast bars."},
{1548612692, "New Feature", "January 27, 2019", "Added options to customize the cast bar Spark."},
Expand Down
4 changes: 4 additions & 0 deletions Plater_OptionsPanel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,10 @@ function frontPageFrame.OpenNewsWindow()
line.backdrop_color = {.4, .4, .4, .6}
line.backdrop_color_highlight = {.5, .5, .5, .8}
line:SetBackdropColor (.4, .4, .4, .6)
else
line.backdrop_color = {0, 0, 0, 0.2}
line.backdrop_color_highlight = {.2, .2, .2, 0.4}
line:SetBackdropColor (0, 0, 0, 0.2)
end
end
end
Expand Down
1 change: 1 addition & 0 deletions Plater_ScriptingPanels.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Plater.APIList = {
{Name = "GetRaidMark", Signature = "Plater.GetRaidMark (unitFrame)", Desc = "Return which raid mark the nameplate has. Always return false if the nameplate is the personal health bar."},
{Name = "GetConfig", Signature = "Plater.GetConfig (unitFrame)", Desc = "Return a table with the settings chosen for the nameplate in the options panel. Use it to restore values is needed."},
{Name = "GetPlayerRole", Signature = "Plater:GetPlayerRole()", Desc = "Return TANK DAMAGER HEALER or NONE."},
{Name = "SetExecuteRange", Signature = "Plater.SetExecuteRange (isExecuteEnabled, healthAmount)", Desc = "Set if Plater should check for execute range and in what percent of health the execute range starts\n\nhealthAmount is in a range of zero to one, example: 25% is 0.25"},

{Name = "IsInCombat", Signature = "Plater.IsInCombat()", Desc = "Return 'true' if the player is in combat."},
{Name = "IsPlayerTank", Signature = "Plater.IsPlayerTank()", Desc = "Return 'true' if the player is in the tank role."},
Expand Down
Binary file added images/segment_texture_1.blp
Binary file not shown.
18 changes: 17 additions & 1 deletion libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local dversion = 137
local dversion = 138
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)

Expand Down Expand Up @@ -2779,6 +2779,22 @@ function DF:GetCLEncounterIDs()
end


------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> delta seconds reader

if (not DetailsFrameworkDeltaTimeFrame) then
CreateFrame ("frame", "DetailsFrameworkDeltaTimeFrame", UIParent)
end

local deltaTimeFrame = DetailsFrameworkDeltaTimeFrame
deltaTimeFrame:SetScript ("OnUpdate", function (self, deltaTime)
self.deltaTime = deltaTime
end)

function GetWorldDeltaSeconds()
return deltaTimeFrame.deltaTime
end

------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> debug

Expand Down
14 changes: 12 additions & 2 deletions libs/DF/normal_bar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
end
--> left color
local gmember_color = function (_object)
return _object._texture.original_colors
local r, g, b, a = _object._texture:GetVertexColor()
return r, g, b, a
end
--> icon
local gmember_icon = function (_object)
Expand Down Expand Up @@ -208,7 +209,7 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
--> color
local smember_color = function (_object, _value)
local _value1, _value2, _value3, _value4 = DF:ParseColors (_value)

_object.statusbar:SetStatusBarColor (_value1, _value2, _value3, _value4)
_object._texture.original_colors = {_value1, _value2, _value3, _value4}
_object.timer_texture:SetVertexColor (_value1, _value2, _value3, _value4)
Expand Down Expand Up @@ -348,8 +349,15 @@ local BarMetaFunctions = _G [DF.GlobalWidgetControlNames ["normal_bar"]]
function BarMetaFunctions:Hide()
self.statusbar:Hide()
end


--> return color
function BarMetaFunctions:GetVertexColor()
return self._texture:GetVertexColor()
end

--> set value (status bar)

function BarMetaFunctions:SetValue (value)
if (not value) then
value = 0
Expand Down Expand Up @@ -768,6 +776,8 @@ function DF:NewBar (parent, container, name, member, w, h, value, texture_name)

--> create widgets
BarObject.statusbar = CreateFrame ("statusbar", name, parent)
DF:Mixin (BarObject.statusbar, DF.WidgetFunctions)

build_statusbar (BarObject.statusbar)

BarObject.widget = BarObject.statusbar
Expand Down
1 change: 1 addition & 0 deletions libs/DF/picture.lua
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ function DF:NewImage (parent, texture, w, h, layer, coords, member, name)

ImageObject.image = parent:CreateTexture (name, layer or "OVERLAY")
ImageObject.widget = ImageObject.image
DF:Mixin (ImageObject.image, DF.WidgetFunctions)

if (not APIImageFunctions) then
APIImageFunctions = true
Expand Down

0 comments on commit 731b178

Please sign in to comment.