feat(ui): GameItemBase への仮想プロパティ追加とメイン画面バッジ表示バインディングの堅牢化
This commit is contained in:
1 parent
7ead7386f6
commit
2fa40c950f
3 files changed
+269
-73
No files matched your search
+59
-27
@@ -522,25 +522,25 @@
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Right">
|
||||
<!-- エンジン種別バッジ (エンジン文字列が空なら非表示) -->
|
||||
<Border Background="{Binding EngineLabelBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding EngineLabelText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding EngineLabelText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding EngineLabelText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- SRPG アーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SrpgBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SrpgBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding SrpgBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SrpgBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- NW.jsバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{StaticResource BadgeNwjsBg}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding NwjsBadgeVisibility}">
|
||||
Visibility="{Binding NwjsBadgeVisibility, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="NW.js" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- その他バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#57606F" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding OtherBadgeVisibility}">
|
||||
Visibility="{Binding OtherBadgeVisibility, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="その他" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
@@ -576,36 +576,42 @@
|
||||
<TextBlock Text="Mono" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ウディタアーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding WolfArchiveBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding WolfArchiveBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding WolfArchiveBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ASARバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding AsarBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding AsarBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding AsarBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding AsarBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- RGSSアーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding RgssBadgeBackground}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding RgssBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding RgssBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding RgssBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#6C5CE7" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="Enigma Virtual Box でパックされています。選択して「📦 EVBを解凍」を押してください。"
|
||||
Visibility="{Binding EvbBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding EvbBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding EvbBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 要解凍バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#FDCB6E" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="選択して「📦 EVBを解凍」を押すと、同梱の evbunpack で解凍できます。"
|
||||
Visibility="{Binding EvbNeedsUnpackBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding EvbNeedsUnpackBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding EvbNeedsUnpackBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#3A2A00"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 解凍済みバッジ (文字が空なら非表示) -->
|
||||
<Border Background="#00B894" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
ToolTip="EVB は解凍済みです。解凍後の exe で起動し、改造も解凍先フォルダへ適用されます。"
|
||||
Visibility="{Binding EvbExtractedBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding EvbExtractedBadgeText, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding EvbExtractedBadgeText}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
@@ -743,51 +749,75 @@
|
||||
<WrapPanel Orientation="Horizontal" Margin="0,4,0,0">
|
||||
<!-- エンジン種別バッジ (エンジン文字列が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{Binding SelectedItem.EngineLabelBackground, ElementName=lstGames}"
|
||||
Visibility="{Binding SelectedItem.EngineLabelText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding SelectedItem.EngineLabelText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.EngineLabelText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- NW.jsバッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeNwjsBg}"
|
||||
Visibility="{Binding SelectedItem.NwjsBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.NwjsBadgeVisibility, ElementName=lstGames, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="NW.js" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- その他バッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="#57606F"
|
||||
Visibility="{Binding SelectedItem.OtherBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.OtherBadgeVisibility, ElementName=lstGames, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="その他" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Unityバックエンドバッジ (文字が空なら非表示) -->
|
||||
<Border CornerRadius="4" Padding="6,2" Margin="0,0,6,0" Background="{StaticResource BadgeIl2cppBg}"
|
||||
Visibility="{Binding SelectedItem.BackendBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}}">
|
||||
Visibility="{Binding SelectedItem.BackendBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.BackendBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- Unityバージョン -->
|
||||
<TextBlock Text="{Binding SelectedItem.UnityVersion, ElementName=lstGames, StringFormat='Unity {0}'}"
|
||||
FontSize="11" Foreground="{StaticResource TextSecondary}" VerticalAlignment="Center" Margin="0,0,8,0"
|
||||
Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsUnityToVisibilityConverter.Instance}}"/>
|
||||
Visibility="{Binding SelectedItem, ElementName=lstGames, Converter={x:Static helpers:IsUnityToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}"/>
|
||||
|
||||
<!-- ASARバッジ -->
|
||||
<!-- ASARバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SelectedItem.AsarBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.AsarBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.AsarBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.AsarBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- RGSSバッジ -->
|
||||
<!-- RGSSバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SelectedItem.RgssBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.RgssBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.RgssBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.RgssBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- ウディタアーカイブバッジ -->
|
||||
<!-- ウディタアーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SelectedItem.WolfArchiveBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.WolfArchiveBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- SRPGアーカイブバッジ (文字が空なら非表示) -->
|
||||
<Border Background="{Binding SelectedItem.SrpgBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.SrpgBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.SrpgBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#6C5CE7" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.EvbBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.EvbBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 要解凍バッジ (文字が空なら非表示) -->
|
||||
<Border Background="#FDCB6E" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.EvbNeedsUnpackBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.EvbNeedsUnpackBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#3A2A00"/>
|
||||
</Border>
|
||||
|
||||
<!-- EVB 解凍済みバッジ (文字が空なら非表示) -->
|
||||
<Border Background="#00B894" CornerRadius="4" Padding="6,2" Margin="0,0,6,0"
|
||||
Visibility="{Binding SelectedItem.EvbExtractedBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.EvbExtractedBadgeText, ElementName=lstGames}" FontSize="11" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
|
||||
<!-- 改造中バッジ -->
|
||||
<Border CornerRadius="4" Padding="6,2" Background="{StaticResource BadgeModdedBg}" Margin="0,0,6,0">
|
||||
<Border.Style>
|
||||
@@ -877,11 +907,12 @@
|
||||
|
||||
<!-- ASARパッケージ管理セクション(IsAsar時のみ表示) -->
|
||||
<Border Background="#1E1E2E" BorderBrush="#6C5CE7" BorderThickness="1.5" CornerRadius="8" Padding="14" Margin="0,0,0,14"
|
||||
Visibility="{Binding SelectedItem.AsarBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.AsarBadgeVisibility, ElementName=lstGames, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||||
<TextBlock Text="📦 app.asar パッケージ管理" FontSize="13" FontWeight="Bold" Foreground="#A29BFE"/>
|
||||
<Border Background="{Binding SelectedItem.AsarBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0">
|
||||
<Border Background="{Binding SelectedItem.AsarBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0"
|
||||
Visibility="{Binding SelectedItem.AsarBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.AsarBadgeText, ElementName=lstGames}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@@ -909,7 +940,7 @@
|
||||
|
||||
<!-- Enigma Virtual Box (EVB) 梱包管理セクション(IsEvbPacked時のみ表示) -->
|
||||
<Border Background="#1E1E2E" BorderBrush="#A29BFE" BorderThickness="1.5" CornerRadius="8" Padding="14" Margin="0,0,0,14"
|
||||
Visibility="{Binding SelectedItem.EvbBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.EvbBadgeVisibility, ElementName=lstGames, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||||
<TextBlock Text="🧩 Enigma Virtual Box (EVB) 管理" FontSize="13" FontWeight="Bold" Foreground="#A29BFE"/>
|
||||
@@ -941,11 +972,12 @@
|
||||
|
||||
<!-- RGSSアーカイブ管理セクション(HasRgssArchive時のみ表示) -->
|
||||
<Border Background="#1E1E2E" BorderBrush="#00CEC9" BorderThickness="1.5" CornerRadius="8" Padding="14" Margin="0,0,0,14"
|
||||
Visibility="{Binding SelectedItem.RgssBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.RgssBadgeVisibility, ElementName=lstGames, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||||
<TextBlock Text="📦 RGSS アーカイブ管理" FontSize="13" FontWeight="Bold" Foreground="#81ECEC"/>
|
||||
<Border Background="{Binding SelectedItem.RgssBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0">
|
||||
<Border Background="{Binding SelectedItem.RgssBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0"
|
||||
Visibility="{Binding SelectedItem.RgssBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.RgssBadgeText, ElementName=lstGames}" FontSize="10" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@@ -1135,7 +1167,7 @@
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
|
||||
<TextBlock Text="📦 Data.wolf アーカイブ管理" FontSize="12" FontWeight="Bold" Foreground="#A29BFE"/>
|
||||
<Border Background="{Binding SelectedItem.WolfArchiveBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0"
|
||||
Visibility="{Binding SelectedItem.WolfArchiveBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.WolfArchiveBadgeText, ElementName=lstGames}" FontSize="9" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@@ -1250,7 +1282,7 @@
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,4">
|
||||
<TextBlock Text="📦 data.dts アーカイブ管理" FontSize="12" FontWeight="Bold" Foreground="#A29BFE"/>
|
||||
<Border Background="{Binding SelectedItem.SrpgBadgeBackground, ElementName=lstGames}" CornerRadius="4" Padding="6,2" Margin="10,0,0,0"
|
||||
Visibility="{Binding SelectedItem.SrpgBadgeVisibility, ElementName=lstGames}">
|
||||
Visibility="{Binding SelectedItem.SrpgBadgeText, ElementName=lstGames, Converter={x:Static helpers:StringNotEmptyToVisibilityConverter.Instance}, FallbackValue=Collapsed, TargetNullValue=Collapsed}">
|
||||
<TextBlock Text="{Binding SelectedItem.SrpgBadgeText, ElementName=lstGames}" FontSize="9" FontWeight="Bold" Foreground="#FFFFFF"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
Reference in new issue
Block a user