feat(engine): その他エンジン種別の追加およびラベル・サムネイル基盤の拡張
- エンジン区分に Other(その他)を追加し、該当バッジおよびフィルターに対応 - GameItemBase に EngineLabelText, EngineLabelBackground, OtherBadgeVisibility を追加 - TkoolGameItem および UnityGameItem で各エンジンのラベル表示ロジックを実装 - AppPathHelper にサムネイル保存用ディレクトリ取得メソッドを追加 - Converters に文字列非空時可視化コンバーター(StringNotEmptyToVisibilityConverter)を追加 - TkoolGameItem の EVB「要解凍」バッジ表示テキスト連携を実装
This commit is contained in:
1 parent
4398f80aa4
commit
45bff52198
6 files changed
+116
-7
No files matched your search
@@ -174,6 +174,13 @@ namespace GameLauncher.Engines.Tkool
|
||||
/// <summary>EVB バッジのテキスト</summary>
|
||||
public string EvbBadgeText => "EVB";
|
||||
|
||||
/// <summary>
|
||||
/// EVB「要解凍」バッジのテキスト。未解凍のときだけ "要解凍" を返し、それ以外は空文字を返す。
|
||||
/// バッジはテキスト駆動(StringNotEmptyToVisibilityConverter)で表示制御されるため、
|
||||
/// 無関係なゲームで空のバッジが描画されることはない。
|
||||
/// </summary>
|
||||
public string EvbNeedsUnpackBadgeText => (IsEvbPacked && !IsEvbExtracted) ? "要解凍" : string.Empty;
|
||||
|
||||
/// <summary>EVB 未解凍のときだけ「要解凍」を強調表示するための可視性(一目で分かる導線)</summary>
|
||||
public Visibility EvbNeedsUnpackVisibility => (IsEvbPacked && !IsEvbExtracted) ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
@@ -259,6 +266,8 @@ namespace GameLauncher.Engines.Tkool
|
||||
TkoolEngineType.Tyrano => GameEngineKind.Tyrano,
|
||||
TkoolEngineType.Wolf => GameEngineKind.Wolf,
|
||||
TkoolEngineType.SrpgStudio => GameEngineKind.SrpgStudio,
|
||||
TkoolEngineType.Nwjs => GameEngineKind.Nwjs,
|
||||
TkoolEngineType.Other => GameEngineKind.Other,
|
||||
_ => GameEngineKind.Tkool
|
||||
};
|
||||
|
||||
@@ -282,6 +291,43 @@ namespace GameLauncher.Engines.Tkool
|
||||
public override bool IsWolf => EngineType == TkoolEngineType.Wolf;
|
||||
public override bool IsSrpgStudio => EngineType == TkoolEngineType.SrpgStudio;
|
||||
public override bool IsRgss => EngineType is TkoolEngineType.VX or TkoolEngineType.VXAce;
|
||||
public override bool IsOther => EngineType == TkoolEngineType.Other;
|
||||
|
||||
/// <summary>
|
||||
/// エンジン種別ラベルの表示文字列。該当エンジンが無い場合は空文字を返し、ラベル自体を非表示にします。
|
||||
/// </summary>
|
||||
public override string EngineLabelText => EngineType switch
|
||||
{
|
||||
TkoolEngineType.MV => "MV",
|
||||
TkoolEngineType.MZ => "MZ",
|
||||
TkoolEngineType.VX => "VX",
|
||||
TkoolEngineType.VXAce => "VX Ace",
|
||||
TkoolEngineType.Tyrano => "ティラノ",
|
||||
TkoolEngineType.Wolf => "ウディタ",
|
||||
TkoolEngineType.SrpgStudio => "SRPG",
|
||||
_ => string.Empty
|
||||
};
|
||||
|
||||
/// <summary>エンジン種別ラベルの背景色</summary>
|
||||
public override Brush EngineLabelBackground => EngineType switch
|
||||
{
|
||||
TkoolEngineType.MV => new SolidColorBrush(Color.FromRgb(0x8B, 0x1E, 0x3F)),
|
||||
TkoolEngineType.MZ => new SolidColorBrush(Color.FromRgb(0x1E, 0x5F, 0x8B)),
|
||||
TkoolEngineType.VX => new SolidColorBrush(Color.FromRgb(0xC0, 0x39, 0x2B)),
|
||||
TkoolEngineType.VXAce => new SolidColorBrush(Color.FromRgb(0xD3, 0x54, 0x00)),
|
||||
TkoolEngineType.Tyrano => new SolidColorBrush(Color.FromRgb(0xD3, 0x54, 0x00)),
|
||||
TkoolEngineType.Wolf => new SolidColorBrush(Color.FromRgb(0x8B, 0x57, 0x1E)),
|
||||
TkoolEngineType.SrpgStudio => new SolidColorBrush(Color.FromRgb(0x1E, 0x7A, 0x5F)),
|
||||
_ => Brushes.Transparent
|
||||
};
|
||||
|
||||
/// <summary>NW.jsバッジの可視性</summary>
|
||||
public override Visibility NwjsBadgeVisibility =>
|
||||
EngineType == TkoolEngineType.Nwjs ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
/// <summary>その他バッジの可視性</summary>
|
||||
public override Visibility OtherBadgeVisibility =>
|
||||
EngineType == TkoolEngineType.Other ? Visibility.Visible : Visibility.Collapsed;
|
||||
|
||||
/// <summary>
|
||||
/// 「プリンセスシナジー」(ツクールMZ製・専用改造対象ゲーム)かどうか。
|
||||
@@ -705,6 +751,12 @@ namespace GameLauncher.Engines.Tkool
|
||||
}
|
||||
}
|
||||
|
||||
// ショップ初期個数最大および個別ゲーム専用プラグインは未操作ゲームでは常に既定でOFF
|
||||
if (pluginId is "ShopMaxBuy" or "AlwaysMaxHp" or "AlwaysMaxMp")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (defaultSettings != null && defaultSettings.TryGetValue(pluginId, out var defVal))
|
||||
{
|
||||
return defVal;
|
||||
@@ -718,12 +770,6 @@ namespace GameLauncher.Engines.Tkool
|
||||
}
|
||||
}
|
||||
|
||||
// ショップ初期個数最大および個別ゲーム専用プラグインは既定でOFF
|
||||
if (pluginId is "ShopMaxBuy" or "AlwaysMaxHp" or "AlwaysMaxMp")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return fallbackVal;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user