# BP\_FriendsListGroup

{% hint style="success" %}

#### Like what you're seeing?

Support us as a [GitHub Sponsor](https://kb.heathen.group/old-kb/where-to-buy/become-a-sponsor) and get instant access to all our assets, exclusive tools and assets, escalated support and issue tracking and our gratitude.\
\
These articles are made possible by our [GitHub Sponsors](https://kb.heathen.group/old-kb/where-to-buy/become-a-sponsor) ... become a sponsor today!
{% endhint %}

## Introduction

This example blueprint is used with the [BP\_FriendsListDisplay](https://kb.heathen.group/old-kb/old-toolkit-for-steamworks/unreal/widgets/bp_friendslistdisplay) to emulate the Steam Friends List look. It represents a "friend group" being a collection of friends organized either by tag or status.

<div align="left"><figure><img src="https://4053370152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZWu8yFOWhCYCMkJFmR%2Fuploads%2Fn1XoDdndILD0r65JPUPu%2Fimage.png?alt=media&#x26;token=9cd471ff-6a6d-4687-a89e-32316da5982e" alt=""><figcaption></figcaption></figure></div>

The above image shows 2 such groups "Family" and "Online". This widget does not concern itself with sorting the users but rather expects you to provide it with a list of user IDs to display and a name to show in the header. For example "Family" and then the 3 IDs for Jodi, Maya and Kahlin.

## Construction

The widget has a custom event "Show Users" which when run will set the group name and iterate over the provided IDs

<figure><img src="https://4053370152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZWu8yFOWhCYCMkJFmR%2Fuploads%2FYVa9oqubfW8z2pVNjYuc%2Fimage.png?alt=media&#x26;token=7775622d-d1b0-4ed6-8f42-8f01feaa07d4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4053370152-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MZWu8yFOWhCYCMkJFmR%2Fuploads%2FvqA53gJMvmLWLgYYoPZI%2Fimage.png?alt=media&#x26;token=cf65db64-1346-4000-a1e8-8c8cee17dc29" alt=""><figcaption></figcaption></figure>

As we iterate over the provided IDs we create a new widget of type [BP\_FriendsListEntry ](https://kb.heathen.group/old-kb/old-toolkit-for-steamworks/unreal/widgets/bp_friendslistentry)and pass it a specific User ID from the input array adding it to our Content Root which is a simple panel.

### Clear Children

To simplify clean up we did create a custom Clear Children function that does nothing more than clear the child widgets from our content root making it easy for a parent widget to trigger that process.
