Quantcast

Stuff! This closes #245

Darthpred [08-02-16 - 10:55]
Stuff! This closes #245
Filename
CHANGELOG.txt
ElvUI_SLE/defaults/profile.lua
ElvUI_SLE/modules/sledatatexts/friends.lua
ElvUI_SLE/modules/sledatatexts/guild.lua
ElvUI_SLE/options/datatexts/friends_c.lua
ElvUI_SLE/options/datatexts/guild_c.lua
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 5c0a40b..16724b0 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -5,6 +5,7 @@ Additions:
 - New options for Armory to show character stats that Blizzard decided we don't need. Movement speed anyone? Script based on DejaCharacterStats addon by Dejablue
 - New option to change location panel width based on location name length
 - New options to create a shadow for a number of ElvUI unitframes and actionbars
+- New option for S&L guild and friends datatext to change text displayed
 Fixes:
 - Fixed instance indicator not updating when difficulty is changed inside the instance
 - Fixed Affinitii's addons profile not actually applying (got exactly zero reports on that one, shows how much people actually wanted the thing)
diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua
index ce61ce2..dfc25bb 100644
--- a/ElvUI_SLE/defaults/profile.lua
+++ b/ElvUI_SLE/defaults/profile.lua
@@ -247,6 +247,7 @@ P["sle"] = {
 			["sortBN"] = 'TOONNAME',
 			["tooltipAutohide"] = 0.2,
 			["totals"] = false,
+			["textStyle"] = "Default",
 		},
 		["guild"] = {
 			["combat"] = false,
@@ -257,6 +258,7 @@ P["sle"] = {
 			["sortGuild"] = 'TOONNAME',
 			["tooltipAutohide"] = 0.2,
 			["totals"] = false,
+			["textStyle"] = "Default",
 		},
 		["mail"] = {
 			["icon"] = true,
diff --git a/ElvUI_SLE/modules/sledatatexts/friends.lua b/ElvUI_SLE/modules/sledatatexts/friends.lua
index ec33d22..d863e1b 100644
--- a/ElvUI_SLE/modules/sledatatexts/friends.lua
+++ b/ElvUI_SLE/modules/sledatatexts/friends.lua
@@ -215,11 +215,11 @@ function DTP:update_Friends()
 	local bnTotal, bnOnline = T.BNGetNumFriends()
 	local totalOnline = friendsOnline + bnOnline
 	local totalFriends = friendsTotal + bnTotal
-
+	local text = E.db.sle.dt.friends.textStyle == "Default" and "|cffffffff"..L["Friends"]..": |r" or E.db.sle.dt.friends.textStyle == "NoText" and "" or E.db.sle.dt.friends.textStyle == "Icon" and "|TInterface\\ICONS\\Achievement_Reputation_01:12|t: "
 	if E.db.sle.dt.friends.totals then
-		LDB.text = "|cffffffff"..L["Friends"]..": |r"..valueColor(totalOnline).."/"..valueColor(totalFriends)
+		LDB.text = text..valueColor(totalOnline).."/"..valueColor(totalFriends)
 	else
-		LDB.text = "|cffffffff"..L["Friends"]..": |r"..valueColor(totalOnline)
+		LDB.text = text..valueColor(totalOnline)
 	end
 end

diff --git a/ElvUI_SLE/modules/sledatatexts/guild.lua b/ElvUI_SLE/modules/sledatatexts/guild.lua
index 331f2e3..3e00ac2 100644
--- a/ElvUI_SLE/modules/sledatatexts/guild.lua
+++ b/ElvUI_SLE/modules/sledatatexts/guild.lua
@@ -165,16 +165,17 @@ function DTP:update_Guild()
 	if T.IsInGuild() then
 		T.GuildRoster()
 		local guildTotal, online = T.GetNumGuildMembers()
-			for i = 1, T.GetNumGuildMembers() do
-				local _, _, _, _, _, _, _, _, connected, _, _, _, _, isMobile = T.GetGuildRosterInfo(i)
-				if isMobile then
-					online = online + 1
-				end
+		for i = 1, T.GetNumGuildMembers() do
+			local _, _, _, _, _, _, _, _, connected, _, _, _, _, isMobile = T.GetGuildRosterInfo(i)
+			if isMobile then
+				online = online + 1
 			end
+		end
+		local text = E.db.sle.dt.guild.textStyle == "Default" and "|cffffffff"..GUILD..": |r" or E.db.sle.dt.guild.textStyle == "NoText" and "" or E.db.sle.dt.guild.textStyle == "Icon" and "|TInterface\\ICONS\\Achievement_Dungeon_HEROIC_GloryoftheRaider:12|t: "
 		if E.db.sle.dt.guild.totals then
-			LDB.text = --[["|cff82c5ff"]]"|cffffffff"..GUILD..": |r"..valueColor(online).."/"..valueColor(guildTotal)--[["|r"]]
+			LDB.text = --[["|cff82c5ff"]]text..valueColor(online).."/"..valueColor(guildTotal)--[["|r"]]
 		else
-			LDB.text = "|cffffffff"..GUILD..": |r"..valueColor(online)
+			LDB.text = text..valueColor(online)
 		end
 	else
 		LDB.text = "|cffffffff"..L["No Guild"].."|r"
diff --git a/ElvUI_SLE/options/datatexts/friends_c.lua b/ElvUI_SLE/options/datatexts/friends_c.lua
index b17e03d..cd295c8 100644
--- a/ElvUI_SLE/options/datatexts/friends_c.lua
+++ b/ElvUI_SLE/options/datatexts/friends_c.lua
@@ -30,8 +30,20 @@ local function configTable()
 				get = function(info) return E.db.sle.dt.friends.totals end,
 				set = function(info, value) E.db.sle.dt.friends.totals = value; DTP:update_Friends(); end,
 			},
-			hideFriends = {
+			textStyle = {
 				order = 4,
+				type = "select",
+				name = L["Style"],
+				values = {
+					["Default"] = DEFAULT,
+					["Icon"] = L["Icon"],
+					["NoText"] = NONE,
+				},
+				get = function(info) return E.db.sle.dt.friends.textStyle  end,
+				set = function(info, value) E.db.sle.dt.friends.textStyle  = value; DTP:update_Friends(); end,
+			},
+			hideFriends = {
+				order = 5,
 				type = "toggle",
 				name = L["Hide Friends"],
 				desc = L["Minimize the Friend Datatext."],
@@ -39,7 +51,7 @@ local function configTable()
 				set = function(info, value) E.db.sle.dt.friends.hideFriends = value; end,
 			},
 			hide_hintline = {
-				order = 5,
+				order = 6,
 				type = "toggle",
 				name = L["Hide Hints"],
 				desc = L["Hide the hints in the tooltip."],
@@ -47,14 +59,13 @@ local function configTable()
 				set = function(info, value) E.db.sle.dt.friends.hide_hintline = value; end,
 			},
 			expandBNBroadcast = {
-				order = 6,
+				order = 7,
 				type = "toggle",
 				name = L["Expand RealID"],
 				desc = L["Display realid with two lines to view broadcasts."],
 				get = function(info) return E.db.sle.dt.friends.expandBNBroadcast end,
 				set = function(info, value) E.db.sle.dt.friends.expandBNBroadcast = value; end,
 			},
-			spacer = { order = 7, type = 'description', name = "" },
 			tooltipAutohide = {
 				order = 8,
 				type = "range",
diff --git a/ElvUI_SLE/options/datatexts/guild_c.lua b/ElvUI_SLE/options/datatexts/guild_c.lua
index 4e063e6..5a6566f 100644
--- a/ElvUI_SLE/options/datatexts/guild_c.lua
+++ b/ElvUI_SLE/options/datatexts/guild_c.lua
@@ -30,8 +30,20 @@ local function configTable()
 				get = function(info) return E.db.sle.dt.guild.totals end,
 				set = function(info, value) E.db.sle.dt.guild.totals = value; DTP:update_Guild(); end,
 			},
-			hide_hintline = {
+			textStyle = {
 				order = 4,
+				type = "select",
+				name = L["Style"],
+				values = {
+					["Default"] = DEFAULT,
+					["Icon"] = L["Icon"],
+					["NoText"] = NONE,
+				},
+				get = function(info) return E.db.sle.dt.guild.textStyle  end,
+				set = function(info, value) E.db.sle.dt.guild.textStyle  = value; DTP:update_Guild(); end,
+			},
+			hide_hintline = {
+				order = 5,
 				type = "toggle",
 				name = L["Hide Hints"],
 				desc = L["Hide the hints in the tooltip."],
@@ -39,7 +51,7 @@ local function configTable()
 				set = function(info, value) E.db.sle.dt.guild.hide_hintline = value; end,
 			},
 			hide_gmotd = {
-				order = 5,
+				order = 6,
 				type = "toggle",
 				name = L["Hide MOTD"],
 				desc = L["Hide the guild's Message of the Day in the tooltip."],
@@ -47,7 +59,7 @@ local function configTable()
 				set = function(info, value) E.db.sle.dt.guild.hide_gmotd = value; end,
 			},
 			hideGuild = {
-				order = 6,
+				order = 7,
 				type = "toggle",
 				name = L["Hide Guild"],
 				desc = L["Minimize the Guild Datatext."],
@@ -55,18 +67,13 @@ local function configTable()
 				set = function(info, value) E.db.sle.dt.guild.hideGuild = value; end,
 			},
 			hide_guildname = {
-				order = 7,
+				order = 8,
 				type = "toggle",
 				name = L["Hide Guild Name"],
 				desc = L["Hide the guild's name in the tooltip."],
 				get = function(info) return E.db.sle.dt.guild.hide_guildname end,
 				set = function(info, value) E.db.sle.dt.guild.hide_guildname = value; end,
 			},
-			spacer = {
-				order = 8,
-				type = 'description',
-				name = "",
-			},
 			tooltipAutohide = {
 				order = 9,
 				type = "range",