Jump to content
LaunchBox Community Forums

Total Games Count in Playlist??


shro2016

Recommended Posts

3 hours ago, shro2016 said:

Thanks @eatkinola would you mind providing me the custom control to do this and some instruction on using it please?

Sure, I can do that. It's actually something I'm developing now, so I need to tune up a few more things before I give it to you. As a heads up, though, this is how it's used:

<!-- THIS GOES IN THE VIEW HEADER TO REFERENCE THE CONTROL LIBRARY -->
xmlns:aoc="clr-namespace:Ao.Bigbox.Controls;assembly=Ao.Bigbox.Themer.v3_2"

<!-- THIS CONTROL LATCHES ONTO THE LB API AND GETS THE INFORMATION -->
<aop:SelectionSnoop x:Name="SelectionSnoop" />

<!-- PULL INFO FROM THE SNOOP CONTROL AS NEEDED -->
<Viewbox Grid.Column="1" Grid.Row="4" HorizontalAlignment="Left">
    <TextBlock Style="{StaticResource EVOTbEmph}">
        <TextBlock.Text>
            <MultiBinding StringFormat="{}Completed {0} of {1} Games">
                <Binding ElementName="SelectionSnoop" Path="ActiveSelectionGameListInfo.GamesCompleted" />
                <Binding ElementName="SelectionSnoop" Path="ActiveSelectionGameListInfo.GamesAvailable" />
            </MultiBinding>
        </TextBlock.Text>
    </TextBlock>
</Viewbox>

The SelectionSnoop control basically exposes data from the LaunchBox API to the user interface. Behind the scenes, it also determines other data not directly exposed by the API, e.g., number of games completed, average star rating for a collection of games, etc.

Link to comment
Share on other sites

@shro2016 FYI posted a new theme called Minimal-EVO which uses that plugin feature I mentioned above. You can grab the dlls from the plugin folder of the Minimal-EVO download. Please note you'll need to include all three dlls for it to work. Please see TextFiltersView for an example how it's used. Eventually I might get around to updating the docs and dll for AO Bigbox Customs in the plugins download section. For now, here is the info provided by the SelectionSnoop control:

  • ActiveGame
  • ActivePlatform
  • ActivePlatformCategory
  • ActivePlaylist
  • ActiveFilterType
  • ActiveFilterValue
  • ActionSelectionGameListInfo -- for the active category, platform, playlist, or filter

The game list info object contains the following:

  • GamesAvailable (count)
  • GamesCompleted (count)
  • GamePlayedLast (IGame object)
  • GamePlayedMost (IGame object)
  • StarRatingsAvg (double)
  • StarRatingsNum (int: number of games w/ratings)
  • DateLongestAgo (oldest game in the list)
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...