Frenemy

5 - Hide friends count on text label

What is the enhancement in mind? How should it look and feel?

Allow hiding of friends information on databroker text "label"

Please provide any additional information below.

Please allow us to hide the Friends: n  on the text portion of the addon. It is fine on the tooltip but as so many have migrated to battle net friends lists instead of purely in game only friends, often the friends lists is 0.

Edit: Much like how you hide the guild count already if someone is not in a guild. Maybe put in a conditional statement that if the friend count is 0, hide the text?

User When Change
transitbus Nov 12, 2014 at 14:53 UTC Changed description:
  Please provide any additional information below.

  Please allow us to hide the Friends: n  on the text portion of the addon. It is fine on the tooltip but as so many have migrated to battle net friends lists instead of purely in game only friends, often the friends lists is 0.
+
+ Edit: Much like how you hide the guild count already if someone is not in a guild. Maybe put in a conditional statement that if the friend count is 0, hide the text?
transitbus Nov 12, 2014 at 14:51 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 3 comments
  • Avatar of transitbus transitbus Jan 18, 2016 at 05:05 UTC - 0 likes

    Using Talyruis' great idea, I expanded on it to include the total count as that can be useful in view guild members leaving or friends leaving plus I like numbers ;)

    function DataObject:UpdateDisplay()
    	local output = ("%s: %s%d/%d|r"):format(_G.FRIENDS, _G.BATTLENET_FONT_COLOR_CODE, OnlineFriendsCount + OnlineBattleNetCount, TotalFriendsCount + TotalBattleNetCount)
    
    	if _G.IsInGuild() then
    		output = ("%s %s: %s%d/%d|r"):format(output, _G.GUILD, _G.GREEN_FONT_COLOR_CODE, OnlineGuildMembersCount, TotalGuildMembersCount)
    	end
    
    	self.text = output
    end
    

    This utilizes the existing color scheme to color the bnet count blue and guild count green while using the default broker display font color for the labels.

  • Avatar of transitbus transitbus Nov 16, 2014 at 04:04 UTC - 0 likes

    Here is the code edit I do to get this working. This is the entire function:

    removed old code as it was not working as intended
    
    Last edited Jan 18, 2016 by transitbus
  • Avatar of Talyrius Talyrius Nov 15, 2014 at 13:35 UTC - 0 likes

    I submitted a feature request that would allow you to do this if it were implemented.

    Quote from Ticket #1 - Feature requests:
    • Add an option to reformat the string used for the broker's text. RealID Toons does something similar. I'd prefer to add the friends and Real ID counts together (ignoring duplicates and those who aren't in-game), as well as use different colors to match the rest of the brokers in my UI. In the meantime, I've changed my local copy as follows:
    function DataObject:UpdateDisplay()
    	local output = ("%d |cFF3E819B%s|r"):format(OnlineFriendsCount + OnlineBattleNetCount, _G.FRIENDS)
    
    	if _G.IsInGuild() then
    		output = ("%s %d |cFF3E819B%s|r"):format(output, OnlineGuildMembersCount, _G.GUILD)
    	end
    
    	self.text = output
    end
    
  • 3 comments

Facts

Last updated
Nov 12, 2014
Reported
Nov 12, 2014
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees