Jump to content
LaunchBox Community Forums

NoshOnThisTwice LaunchBox custom theme badges and RetroAchievements update


Recommended Posts

I am not the original author of this lovely LaunchBox custom theme so I hope that they are okay with this. I have added Badges to the main view, and RetroAchievements score and Badges menu to the menu bar. I also fixed the Play/Edit/Configure/Delete buttons so that the text displayed correctly for me. I hope it works for you, too.

NoshOnThisTwiceLB.zip

Edited by Mister Slimm
Link to comment
Share on other sites

                        <ListView ItemsSource="{Binding Badges}" Background="Transparent" BorderThickness="0" VerticalAlignment="Top"
                            HorizontalAlignment="Right" Margin="-21,2,-21,0" Visibility="{Binding BoxVisibility}">
                            <ListView.ItemTemplate>
                                <DataTemplate>
                                    <Image x:Name="BadgeImage" Source="{Binding Path=Icon, Converter={StaticResource ImageToSourceConverter}}"
                                        Width="20" Margin="0,0,0,5" RenderOptions.BitmapScalingMode="HighQuality" ToolTip="{Binding Name}" />
                                </DataTemplate>
                            </ListView.ItemTemplate>
                            <ListView.ItemContainerStyle>
                                <Style TargetType="ListViewItem">
                                    <Setter Property="SnapsToDevicePixels" Value="True" />
                                    <Setter Property="Margin" Value="0" />
                                    <Setter Property="Padding" Value="0" />
                                    <Setter Property="Background" Value="Transparent" />
                                    <Setter Property="BorderThickness" Value="0" />
                                    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                                    <Setter Property="Background" Value="Transparent" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="{x:Type ListViewItem}">
                                                <ContentPresenter x:Name="ContentPresenter" HorizontalAlignment="Stretch" VerticalAlignment="Top"
                                                    SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListView.ItemContainerStyle>
                        </ListView>

So I copied this section from the Default/BoxesContentView.xaml and pasted it into the BoxesContentView.xaml for the new theme in the same place.

For NoshOnThisTwice LB, it went at the end of this element just before the closing /Grid tag:

<ListView.ItemTemplate>
                <DataTemplate>
                    <Grid Margin="{Binding Margin}">

 

Link to comment
Share on other sites

Right, yeah, I had that, too!

You have to add this line to the UserControl element at the top of the file (I added it after the xmlns:controls line):

xmlns:windows="clr-namespace:Unbroken.LaunchBox.Windows;assembly=Unbroken.LaunchBox.Windows"
             

I do not remember if I had to do anything else.

Link to comment
Share on other sites

Ah! This is what happens when I try to remember all the steps I went through.

We also have to add the following entry to the UserControl.Resources element:

        <windows:ImageToSourceConverter x:Key="ImageToSourceConverter" x:Name="ImageToSourceConverter"/>

I will set up a new post with an updated LBPlex.

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
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.

 Share

×
×
  • Create New...