- Engines/ 配下へエンジン別に再編 (Common/Rgss/Tkool/Tyrano/Wolf/Unity/Nwjs) - ゲーム個別処理を Engines/<Engine>/Games/<GameName>/ へ分離し、共通処理から明示呼び出し - 外部ツールを Engines/<Engine>/Tools/ へ移動し、AppPathHelper 経由で解決 - 旧 Tools/ 直下参照と不要な参照ファイル/バックアップを削除 - エージェント規則 AGENTS.md を追加し、README から参照 - publish.ps1 を Engines/<Engine>/Tools/ の再帰配置に対応
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using GameLauncher.Models;
|
|
using GameLauncher.Engines.Unity;
|
|
|
|
namespace GameLauncher
|
|
{
|
|
/// <summary>
|
|
/// PlayerPrefsキー追加ダイアログ
|
|
/// </summary>
|
|
public partial class AddKeyDialog : Window
|
|
{
|
|
public string KeyName { get; private set; } = string.Empty;
|
|
public PlayerPrefsType KeyType { get; private set; } = PlayerPrefsType.Int;
|
|
public string KeyValue { get; private set; } = string.Empty;
|
|
|
|
public AddKeyDialog()
|
|
{
|
|
InitializeComponent();
|
|
txtKeyName.Focus();
|
|
}
|
|
|
|
private void btnOk_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
var keyName = txtKeyName.Text.Trim();
|
|
if (string.IsNullOrWhiteSpace(keyName))
|
|
{
|
|
MessageBox.Show("キー名を入力してください。", "入力エラー", MessageBoxButton.OK, MessageBoxImage.Warning);
|
|
return;
|
|
}
|
|
|
|
KeyName = keyName;
|
|
var selectedTag = (cmbKeyType.SelectedItem as ComboBoxItem)?.Tag?.ToString();
|
|
KeyType = selectedTag switch
|
|
{
|
|
"Float" => PlayerPrefsType.Float,
|
|
"String" => PlayerPrefsType.String,
|
|
_ => PlayerPrefsType.Int
|
|
};
|
|
KeyValue = txtKeyValue.Text;
|
|
|
|
DialogResult = true;
|
|
Close();
|
|
}
|
|
|
|
private void btnCancel_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
DialogResult = false;
|
|
Close();
|
|
}
|
|
}
|
|
}
|