Refactor identifiers and add subtitle UI

This commit is contained in:
2026-05-17 11:56:08 +01:00
parent 3174079e37
commit 9f9ef72390
25 changed files with 276 additions and 6871 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace BriarQueen.Data.Identifiers
{
@@ -21,63 +22,77 @@ namespace BriarQueen.Data.Identifiers
public static class TutorialPopupTexts
{
public static readonly Dictionary<TutorialPopupID, string> AllPopups = new()
private static readonly IReadOnlyDictionary<TutorialPopupID, string> _allPopups =
new ReadOnlyDictionary<TutorialPopupID, string>(
new Dictionary<TutorialPopupID, string>
{
{
TutorialPopupID.ReturnToPreviousLevel,
"Click the lower corners to return to the previous area."
},
{
TutorialPopupID.UsingItemsTogether,
"Select one item, then click another to use them together."
},
{
TutorialPopupID.HideHUD,
"Press '{Hide_HUD}' to hide the HUD."
},
{
TutorialPopupID.MultipleUseItems,
"Some items can be used more than once, but they may wear out."
},
{
TutorialPopupID.DarkRooms,
"Dark rooms can hide important details. Use light to reveal them."
},
{
TutorialPopupID.Codex,
"Documents you find are stored in the Codex. Press '{Codex}' to open it."
},
{
TutorialPopupID.HiddenItems,
"Some items are hidden. Search carefully."
},
{
TutorialPopupID.ResetPuzzles,
"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 open your tools."
},
{
TutorialPopupID.ItemsAway,
"Press '{Right_Click}' to put away the selected item."
},
{
TutorialPopupID.ItemCycling,
"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 bool TryGet(TutorialPopupID id, out string text)
{
{
TutorialPopupID.ReturnToPreviousLevel,
"Click the lower corners to return to the previous area."
},
{
TutorialPopupID.UsingItemsTogether,
"Select one item, then click another to use them together."
},
{
TutorialPopupID.HideHUD,
"Press '{Hide_HUD}' to hide the HUD."
},
{
TutorialPopupID.MultipleUseItems,
"Some items can be used more than once, but they may wear out."
},
{
TutorialPopupID.DarkRooms,
"Dark rooms can hide important details. Use light to reveal them."
},
{
TutorialPopupID.Codex,
"Documents you find are stored in the Codex. Press '{Codex}' to open it."
},
{
TutorialPopupID.HiddenItems,
"Some items are hidden. Search carefully."
},
{
TutorialPopupID.ResetPuzzles,
"Some puzzles can be reset if you get stuck."
},
{
TutorialPopupID.LeavingPuzzles,
"When you leave a puzzle, your progress is saved."
},
return _allPopups.TryGetValue(id, out text);
}
{
TutorialPopupID.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 selected item."
},
{
TutorialPopupID.ItemCycling,
"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 string Get(TutorialPopupID id)
{
return _allPopups.TryGetValue(id, out var value) ? value : string.Empty;
}
public static IEnumerable<string> GetAllTexts() => AllPopups.Values;
public static IEnumerable<string> GetAllTexts()
{
return _allPopups.Values;
}
}
}