Jump to content
LaunchBox Community Forums

giotte

Members
  • Posts

    4
  • Joined

  • Last visited

giotte's Achievements

1-Bit Wonder

1-Bit Wonder (1/7)

0

Reputation

  1. Yep, I can confirm that Text="{Binding Name}" works. Thanks CBeats and faeran for your help; I knew it had to be something simple. Nice to finally have this working.
  2. Thanks very much! That definitely helped and now I'm closer, but still not quite there. The GameDetails is now displaying one entry for each of the alternate names, but instead of actually showing me the names, it's just showing the full namespace for the AlternateNames object: "Unbroken.LaunchBox.Data.AlternateName". You can see what I mean in the screenshot below. Here's the code I'm using: <ItemsControl ItemsSource="{Binding Game.AlternateNames}" > <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding}" Foreground="#FFFFFFFF" /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> So the AlternateNames object/interface is being correctly accessed, but I'm not sure what property to use in the <TextBlock Text={Binding}" /> to actually get it to display the name. For the CustomFields property, simply using "{Binding}" is sufficient. But that doesn't work here, and neither does "{Binding Games.AlternateNames}" or "{Binding AlternateNames}" or "{Binding Games}" I feel like I'm really close here. Do you have any other thoughts or suggestions? Thanks again.
  3. I'm modifying the Default LB theme and I'm trying to figure out how to display the Alternate Names for a given game in the Game Details panel when a game is selected. The ListContentView.xaml shows that it's possible to do this, at least in the list view: <DataGridTemplateColumn CellStyle="{StaticResource DataGridCellStyle}" CanUserSort="True" SortMemberPath="AlternateNames"> <DataGridTemplateColumn.Header> <TextBlock Text="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.AltNamesLabel}" /> </DataGridTemplateColumn.Header> <DataGridTemplateColumn.CellTemplate> <DataTemplate> <TextBlock Text="{Binding AlternateNames}" TextTrimming="WordEllipsis" /> </DataTemplate> </DataGridTemplateColumn.CellTemplate> </DataGridTemplateColumn> However, this doesn't work in the GameDetailsView.xaml (presumably because this code is for use in a DataGrid, while the GameDetails uses a ScrollViewer?). Unlike the other items shown on the GameDetail view, I'm gathering that you can't just add a TextBlock with Text="{Binding AlternateNames}" because there could be multiple AlternateNames, so you have a many-to-one relationship. However, the default GameDetailsView.xaml does include an entry for CustomFields, which can also have multiple entries. It does so using an ItemsControl: <ItemsControl ItemsSource="{Binding CustomFields}" Focusable="False"> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding}" Foreground="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, Path=DataContext.ForegroundBrush}" TextWrapping="Wrap" Margin="0,0,0,4" /> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> But for some reason, when I try using this code by replacing "{Binding CustomFields}" with "{Binding AlternateNames}", it doesn't work. I'm probably missing something really basic / obvious... but can anyone point me in the right direction?
  4. Does anyone know how the "Region" column in the Mame.xml metadata is populated? To be clear, I'm not referring to the LB Games Database per se; rather, I'm asking about the specific data for MAME games contained in the MAME.xml file (located in the LaunchBox\Metadata\MAME.xml or from https://gamesdb.launchbox-app.com/Metadata.zip). That file contains a bunch of info specific to arcade / MAME games. From what I can see, almost all the info comes from either: MAME itself (i.e., by running "mame.exe -listxml"), or From the support files provided by ProgettoSnaps (https://www.progettosnaps.net/support/). For example, the "Genre" column in the LB MAME.xml file corresponds exactly with the "category.ini" file from Progetto However, I can't figure out where the "Region" column data comes from. MAME doesn't seem to track this, and I can't find any regional information in the Progetto files. As an example, the arcade game "Jolly Card" has 17 versions with 5 different regions noted: Germany, Italy, North America, World, and NULL / (blank). Part of me wonders if the regions are just inferred by parsing the "Version" info (e.g., "Jolly Card (German, set 1)" is assigned to the "Germany" region). But I can't quite figure out the logic. The "Jolly Card (German, Fun World, bootleg)" game is assigned to "World" instead of Germany (maybe because the "Fun World" term is getting precedence?). Or the "Jolly Card (Croatian, set 1)" is assigned to no region. And then the "Jolly Card (3x3 deal)" game is assigned to North America, even though there's no region info in the game name. So, to summarize: does anyone have insight into how the Region column is obtained? Is it parsed from the game name itself, or is there some 3rd-party source that is being used? Thanks.
×
×
  • Create New...