Skip to content

Commit

Permalink
BuildStatusbarAuthorInfo() now accept values to replace "addon by" an…
Browse files Browse the repository at this point in the history
…d "author name"

Instead of having harcoded "Addon by Tercioo", it now supports any kind of string.
  • Loading branch information
Tercioo committed Nov 9, 2019
1 parent bee39af commit b200e94
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fw.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

local dversion = 160
local dversion = 161

local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
Expand Down
16 changes: 13 additions & 3 deletions panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6771,9 +6771,18 @@ end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--> statusbar info

function DF:BuildStatusbarAuthorInfo (f)

local authorName = DF:CreateLabel (f, "An addon by |cFFFFFFFFTercioo|r")
--[[
authorTable = {
{
authorName = "author name 1",
link = "twitter.com/author1Handle",
}
}
]]

function DF:BuildStatusbarAuthorInfo (f, addonBy, authorsNameString)

local authorName = DF:CreateLabel (f, "" .. (addonBy or "An addon by") .. "|cFFFFFFFF" .. (authorsNameString or "Terciob") .. "|r")
authorName.textcolor = "silver"
local discordLabel = DF:CreateLabel (f, "Discord: ")
discordLabel.textcolor = "silver"
Expand All @@ -6796,6 +6805,7 @@ function DF:BuildStatusbarAuthorInfo (f)
discordTextEntry:SetHook ("OnEditFocusGained", function()
discordTextEntry:HighlightText()
end)

end


Expand Down

0 comments on commit b200e94

Please sign in to comment.