Add subtitle UI for voice playback

This commit is contained in:
2026-05-16 21:33:00 +01:00
parent 58050abded
commit 3174079e37
81 changed files with 8657 additions and 1231 deletions

View File

@@ -27,7 +27,6 @@ namespace BriarQueen.Data.Identifiers
ChapterOneArrivalRoad,
ChapterOneAshwickOutskirts,
ChapterOneInsideBrokenDownCar,
ChapterOneAshwickOutskirtsKeypad,
}
public enum AssetItemKey

View File

@@ -13,6 +13,7 @@ namespace BriarQueen.Data.Identifiers
None = 0,
CarDoorOpening,
ItemPickup,
AshwickGateOpening
}
public enum UIFXKey
@@ -30,6 +31,22 @@ namespace BriarQueen.Data.Identifiers
public enum VoiceKey
{
None = 0,
EmptyHands,
CantUseItem,
SomethingMissing,
CarefulInteract,
LooksImportant,
WrongTool,
CodexLocked,
Locked,
CantGoThere,
DoesntBelong,
FireHot,
AshwickHallowSign,
FirstSkeleton,
ClockTower,
}
public static class AudioNameIdentifiers
@@ -46,16 +63,17 @@ namespace BriarQueen.Data.Identifiers
new ReadOnlyDictionary<SFXKey, string>(
new Dictionary<SFXKey, string>
{
{ SFXKey.CarDoorOpening, "SFX:CarDoorOpening" },
{ SFXKey.ItemPickup, "SFX:ItemPickup" },
{ SFXKey.CarDoorOpening, "SFX:General:CarDoorOpening" },
{ SFXKey.ItemPickup, "SFX:General:ItemPickup" },
{ SFXKey.AshwickGateOpening, "SFX:Level:AshwickOutskirts:GateOpening" },
});
public static readonly IReadOnlyDictionary<UIFXKey, string> UIFX =
new ReadOnlyDictionary<UIFXKey, string>(
new Dictionary<UIFXKey, string>
{
{ UIFXKey.AchievementUnlocked, "UIFX:AchievementUnlocked" },
{ UIFXKey.CodexEntryUnlocked, "UIFX:CodexEntryUnlocked" },
{ UIFXKey.AchievementUnlocked, "UIFX:General:AchievementUnlocked" },
{ UIFXKey.CodexEntryUnlocked, "UIFX:General:CodexEntryUnlocked" },
});
public static readonly IReadOnlyDictionary<AmbienceKey, string> Ambience =
@@ -69,7 +87,21 @@ namespace BriarQueen.Data.Identifiers
new ReadOnlyDictionary<VoiceKey, string>(
new Dictionary<VoiceKey, string>
{
// Add voice mappings here
{ VoiceKey.EmptyHands, "Voice:Item:EmptyHands" },
{ VoiceKey.CantUseItem, "Voice:Item:CantUseItem" },
{ VoiceKey.SomethingMissing, "Voice:Item:SomethingMissing" },
{ VoiceKey.CarefulInteract, "Voice:Item:CarefulInteract" },
{ VoiceKey.LooksImportant, "Voice:Item:LooksImportant" },
{ VoiceKey.WrongTool, "Voice:Item:WrongTool" },
{ VoiceKey.CodexLocked, "Voice:Item:CodexLocked" },
{ VoiceKey.Locked, "Voice:Environment:Locked" },
{ VoiceKey.CantGoThere, "Voice:Environment:CantGoThere" },
{ VoiceKey.DoesntBelong, "Voice:Environment:DoesntBelong" },
{ VoiceKey.FireHot, "Voice:Environment:FireHot" },
{ VoiceKey.AshwickHallowSign, "Voice:Environment:AshwickHallowSign" },
{ VoiceKey.FirstSkeleton, "Voice:Environment:FirstSkeleton" },
{ VoiceKey.ClockTower, "Voice:Environment:ClockTower" },
});
public static string Get(MusicKey key)

View File

@@ -12,7 +12,7 @@ namespace BriarQueen.Data.Identifiers
public enum ClueEntryID
{
None = 0,
AshwickMarketGate,
JasonsNote,
}
public enum PhotoEntryID
@@ -37,7 +37,7 @@ namespace BriarQueen.Data.Identifiers
new ReadOnlyDictionary<ClueEntryID, string>(
new Dictionary<ClueEntryID, string>
{
{ ClueEntryID.AshwickMarketGate, $"{PHOTO_PREFIX}:AshwickMarketGate" },
{ ClueEntryID.JasonsNote, $"{PHOTO_PREFIX}:AshwickMarketGate" },
});
public static readonly IReadOnlyDictionary<PhotoEntryID, string> Photos =

View File

@@ -18,7 +18,6 @@ namespace BriarQueen.Data.Identifiers
public enum LevelInteractKey
{
None = 0,
MarketplaceFirstEntry
}
public enum EnvironmentInteractKey
@@ -29,11 +28,8 @@ namespace BriarQueen.Data.Identifiers
DoesntBelong = 3,
FireHot = 4,
AshwickHallowSign = 5,
AshwickRidgewayStatue = 6,
AshwickBlockedRidgwayRoad = 7,
AshwickRidgewaySkeleton = 8,
AskwickMarketplaceSign = 9,
FirstSkeleton = 10,
ClockTower = 11,
}
public enum UIInteractKey
@@ -62,7 +58,6 @@ namespace BriarQueen.Data.Identifiers
new ReadOnlyDictionary<LevelInteractKey, string>(
new Dictionary<LevelInteractKey, string>
{
{ LevelInteractKey.MarketplaceFirstEntry, "I wonder if any of these are unlocked."}
});
public static readonly IReadOnlyDictionary<EnvironmentInteractKey, string> EnvironmentInteractions =
@@ -74,9 +69,8 @@ namespace BriarQueen.Data.Identifiers
{ EnvironmentInteractKey.DoesntBelong, "This feels out of place." },
{ EnvironmentInteractKey.FireHot, "Too hot to get close." },
{ EnvironmentInteractKey.AshwickHallowSign, "Ashwick Hallow… Even the name feels like a warning."},
{ EnvironmentInteractKey.AshwickRidgewayStatue, "Lovely sculpture. Mildly terrifying, but lovely."},
{ EnvironmentInteractKey.AshwickBlockedRidgwayRoad, "Right. Closed road. Of course it is."},
{ EnvironmentInteractKey.FirstSkeleton, "What the hell happened here?"}
{ EnvironmentInteractKey.FirstSkeleton, "What the hell happened here?"},
{ EnvironmentInteractKey.ClockTower, "Even from here, something about that clock tower feels wrong."}
});
public static readonly IReadOnlyDictionary<UIInteractKey, string> UIInteractions =
@@ -106,4 +100,4 @@ namespace BriarQueen.Data.Identifiers
return UIInteractions.TryGetValue(key, out var value) ? value : string.Empty;
}
}
}
}

View File

@@ -11,24 +11,45 @@ namespace BriarQueen.Data.Identifiers
// TutorialTip = 2
}
public static class SubtitleIdentifiers
public readonly struct SubtitleEntry
{
public static readonly IReadOnlyDictionary<SubtitleKey, string> Subtitles =
new ReadOnlyDictionary<SubtitleKey, string>(
new Dictionary<SubtitleKey, string>
{
// { SubtitleKey.IntroLine, "Subtitle:IntroLine" },
// { SubtitleKey.TutorialTip, "Subtitle:TutorialTip" }
});
public static string Get(SubtitleKey key)
public SubtitleEntry(string text, float preferredDurationSeconds = 0f)
{
return Subtitles.TryGetValue(key, out var value) ? value : string.Empty;
Text = text;
PreferredDurationSeconds = preferredDurationSeconds;
}
public static IEnumerable<string> GetAll()
public string Text { get; }
public float PreferredDurationSeconds { get; }
}
public static class SubtitleIdentifiers
{
public static readonly IReadOnlyDictionary<SubtitleKey, SubtitleEntry> Subtitles =
new ReadOnlyDictionary<SubtitleKey, SubtitleEntry>(
new Dictionary<SubtitleKey, SubtitleEntry>
{
// { SubtitleKey.IntroLine, new SubtitleEntry("Example subtitle.", 2.5f) },
});
public static bool TryGet(SubtitleKey key, out SubtitleEntry entry)
{
return Subtitles.Values;
return Subtitles.TryGetValue(key, out entry);
}
public static string GetText(SubtitleKey key)
{
return Subtitles.TryGetValue(key, out var entry) ? entry.Text : string.Empty;
}
public static float GetPreferredDuration(SubtitleKey key)
{
return Subtitles.TryGetValue(key, out var entry) ? entry.PreferredDurationSeconds : 0f;
}
public static IEnumerable<SubtitleKey> GetAllKeys()
{
return Subtitles.Keys;
}
}
}

View File

@@ -7,12 +7,12 @@ namespace BriarQueen.Data.Identifiers
ReturnToPreviousLevel,
UsingItemsTogether,
HideHUD,
ExitItems,
MultipleUseItems,
DarkRooms,
Codex,
HiddenItems,
ResetPuzzles,
LeavingPuzzles,
Tools,
ItemsAway,
ItemCycling,
@@ -25,7 +25,7 @@ namespace BriarQueen.Data.Identifiers
{
{
TutorialPopupID.ReturnToPreviousLevel,
"Click the bottom corners to return to the previous area."
"Click the lower corners to return to the previous area."
},
{
TutorialPopupID.UsingItemsTogether,
@@ -35,13 +35,9 @@ namespace BriarQueen.Data.Identifiers
TutorialPopupID.HideHUD,
"Press '{Hide_HUD}' to hide the HUD."
},
{
TutorialPopupID.ExitItems,
"Press '{Right_Click}' to exit the current interaction."
},
{
TutorialPopupID.MultipleUseItems,
"Some items can be used multiple times, but they may wear out."
"Some items can be used more than once, but they may wear out."
},
{
TutorialPopupID.DarkRooms,
@@ -49,7 +45,7 @@ namespace BriarQueen.Data.Identifiers
},
{
TutorialPopupID.Codex,
"The Codex is used to collect any documents you encounter. Press '{Codex}' to open it."
"Documents you find are stored in the Codex. Press '{Codex}' to open it."
},
{
TutorialPopupID.HiddenItems,
@@ -57,26 +53,31 @@ namespace BriarQueen.Data.Identifiers
},
{
TutorialPopupID.ResetPuzzles,
"Some puzzles can be reset."
"Some puzzles can be reset if you get stuck."
},
{
TutorialPopupID.LeavingPuzzles,
"When you leave a puzzle, your progress is saved."
},
{
TutorialPopupID.Tools,
"You'll find tools as you explore. Try them on different objects. Press '{Show_Tools}' to view your tools."
"You'll find tools as you explore. Try them on different objects. Press '{Show_Tools}' to open your tools."
},
{
TutorialPopupID.ItemsAway,
"Press '{Right_Click}' to put away the current item."
"Press '{Right_Click}' to put away the selected item."
},
{
TutorialPopupID.ItemCycling,
"Press '{Previous_Item}' or '{Next_Item}' to cycle through your backpack."
"Press '{Previous_Item}' or '{Next_Item}' to cycle through the items in your backpack."
},
{
TutorialPopupID.ToolCycling,
"Press '{Previous_Tool}' or '{Next_Tool}' to cycle through your tools."
}
},
};
public static IEnumerable<string> GetAllTexts() => AllPopups.Values;
}
}
}