Files
GameLauncher/ConfigDialog.xaml

177 lines
11 KiB
XML

<Window x:Class="GameLauncher.ConfigDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="アプリケーション設定"
Height="420" Width="640"
WindowStartupLocation="CenterOwner"
Background="#181824"
Foreground="#E0E0E6"
ResizeMode="NoResize"
FontFamily="Segoe UI, Meiryo UI, Yu Gothic UI">
<Window.Resources>
<SolidColorBrush x:Key="AccentPrimary" Color="#6C5CE7"/>
<SolidColorBrush x:Key="AccentHover" Color="#7D6DF8"/>
<SolidColorBrush x:Key="BorderColor" Color="#38384C"/>
<SolidColorBrush x:Key="TextSecondary" Color="#9E9EB4"/>
<Style x:Key="ModernButton" TargetType="Button">
<Setter Property="Background" Value="#2E2E3E"/>
<Setter Property="Foreground" Value="#E0E0E6"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#44445A"/>
<Setter Property="Padding" Value="14,7"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="6"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#3D3D52"/>
<Setter Property="BorderBrush" Value="{StaticResource AccentPrimary}"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="PrimaryButton" TargetType="Button" BasedOn="{StaticResource ModernButton}">
<Setter Property="Background" Value="{StaticResource AccentPrimary}"/>
<Setter Property="Foreground" Value="#FFFFFF"/>
<Setter Property="BorderThickness" Value="0"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource AccentHover}"/>
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid Margin="24">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- ヘッダー -->
<StackPanel Grid.Row="0" Margin="0,0,0,18">
<TextBlock Text="⚙ 設定 (Configuration)" FontSize="18" FontWeight="Bold" Foreground="#FFFFFF"/>
<TextBlock Text="ツクールVX改造用外部ツール設定およびバックアップ設定を管理します。" FontSize="11" Foreground="{StaticResource TextSecondary}" Margin="0,3,0,0"/>
</StackPanel>
<!-- 設定項目エリア -->
<ScrollViewer Grid.Row="1" VerticalScrollBarVisibility="Auto">
<StackPanel>
<!-- 1. RGSS Extractor パス設定 -->
<Border Background="#20202E" BorderBrush="{StaticResource BorderColor}" BorderThickness="1" CornerRadius="8" Padding="14" Margin="0,0,0,14">
<StackPanel>
<TextBlock Text="📦 RGSS Extractor のパス (ツクールVX / VX Ace用)" FontSize="13" FontWeight="Bold" Foreground="#A29BFE"/>
<TextBlock Text="ツクールVXおよびVX Aceの暗号化アーカイブ (*.rgss3a / *.rgss2a) の解凍・抽出に使用する外部ツールのパスを設定します。"
FontSize="11" Foreground="{StaticResource TextSecondary}" TextWrapping="Wrap" Margin="0,3,0,10"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtRgssExtractorPath" Grid.Column="0" Background="#14141C" Foreground="#FFFFFF"
BorderBrush="{StaticResource BorderColor}" BorderThickness="1" Padding="8,6" FontSize="12"/>
<Button Grid.Column="2" Style="{StaticResource ModernButton}" Content="📁 参照..." Click="btnBrowseExtractor_Click"/>
</Grid>
</StackPanel>
</Border>
<!-- 1.5. Wolf RPG 解凍ツール パス設定 -->
<Border Background="#20202E" BorderBrush="{StaticResource BorderColor}" BorderThickness="1" CornerRadius="8" Padding="14" Margin="0,0,0,14">
<StackPanel>
<TextBlock Text="🐺 Wolf RPG アーカイブ解凍ツールのパス (Data.wolf 解凍用)" FontSize="13" FontWeight="Bold" Foreground="#3B3B98"/>
<TextBlock Text="WOLF RPGエディターの暗号化アーカイブ (*.wolf) の解凍・抽出に使用するツールのパスを設定します(未指定時は内蔵ツール Tools\UberWolfCli.exe が自動使用されます)。"
FontSize="11" Foreground="{StaticResource TextSecondary}" TextWrapping="Wrap" Margin="0,3,0,10"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtWolfExtractorPath" Grid.Column="0" Background="#14141C" Foreground="#FFFFFF"
BorderBrush="{StaticResource BorderColor}" BorderThickness="1" Padding="8,6" FontSize="12"/>
<Button Grid.Column="2" Style="{StaticResource ModernButton}" Content="📁 参照..." Click="btnBrowseWolfExtractor_Click"/>
</Grid>
</StackPanel>
</Border>
<!-- 1.7. ウィンドウ拡大外部ツール パス設定 -->
<Border Background="#20202E" BorderBrush="{StaticResource BorderColor}" BorderThickness="1" CornerRadius="8" Padding="14" Margin="0,0,0,14">
<StackPanel>
<TextBlock Text="🖥 ウィンドウ拡大用 外部ツールのパス (ツクールVX / VX Ace用)" FontSize="13" FontWeight="Bold" Foreground="#FDCB6E"/>
<TextBlock Text="ゲームウィンドウを拡大する外部ツール(Sizer等)の実行ファイルパスを設定します。未指定の場合、ランチャー内蔵のWin32 API方式で拡大します。"
FontSize="11" Foreground="{StaticResource TextSecondary}" TextWrapping="Wrap" Margin="0,3,0,10"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtWindowResizeToolPath" Grid.Column="0" Background="#14141C" Foreground="#FFFFFF"
BorderBrush="{StaticResource BorderColor}" BorderThickness="1" Padding="8,6" FontSize="12"/>
<Button Grid.Column="2" Style="{StaticResource ModernButton}" Content="📁 参照..." Click="btnBrowseWindowResizeTool_Click"/>
</Grid>
</StackPanel>
</Border>
<!-- 2. バックアップ保存先フォルダ -->
<Border Background="#20202E" BorderBrush="{StaticResource BorderColor}" BorderThickness="1" CornerRadius="8" Padding="14" Margin="0,0,0,14">
<StackPanel>
<TextBlock Text="📦 バックアップ統一保存先" FontSize="13" FontWeight="Bold" Foreground="#00B894"/>
<TextBlock Text="ツクールMV/MZ・ティラノ・ツクールVX/VX Ace・Unityのすべてのバックアップは、exe直下のBackupsフォルダ(Z:\自作ソフト\GameLauncher\Backups)に集約されます。"
FontSize="11" Foreground="{StaticResource TextSecondary}" TextWrapping="Wrap" Margin="0,3,0,10"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtBackupsPath" Grid.Column="0" Background="#14141C" Foreground="#81ECEC"
BorderBrush="{StaticResource BorderColor}" BorderThickness="1" Padding="8,6" FontSize="12" IsReadOnly="True"/>
<Button Grid.Column="2" Style="{StaticResource ModernButton}" Content="📂 フォルダを開く" Click="btnOpenBackupsDir_Click"/>
</Grid>
</StackPanel>
</Border>
<!-- 3. デフォルト起動時改造適用 -->
<Border Background="#20202E" BorderBrush="{StaticResource BorderColor}" BorderThickness="1" CornerRadius="8" Padding="14">
<StackPanel>
<CheckBox x:Name="chkDefaultApplyMod" Content="一度も変更していないゲームにおける「起動時に改造を適用する」の初期値をONにする"
FontSize="12" FontWeight="SemiBold" Foreground="#FFFFFF"/>
<TextBlock Text="新規検出されたゲームにおいて、初期状態でスクリプト改造を有効にするかどうかを設定します。"
FontSize="11" Foreground="{StaticResource TextSecondary}" Margin="24,4,0,0"/>
</StackPanel>
</Border>
</StackPanel>
</ScrollViewer>
<!-- ボタンバー -->
<Border Grid.Row="2" Margin="0,18,0,0" Padding="0,12,0,0" BorderBrush="{StaticResource BorderColor}" BorderThickness="0,1,0,0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{StaticResource PrimaryButton}" Content="✔ 保存して閉じる" Width="140" Margin="0,0,10,0" Click="btnSave_Click"/>
<Button Style="{StaticResource ModernButton}" Content="キャンセル" Width="90" Click="btnCancel_Click"/>
</StackPanel>
</Border>
</Grid>
</Window>