diff --git a/ChatTwo/Code/ChatSourceExt.cs b/ChatTwo/Code/ChatSourceExt.cs
index c07fdbf..7bdd18e 100755
--- a/ChatTwo/Code/ChatSourceExt.cs
+++ b/ChatTwo/Code/ChatSourceExt.cs
@@ -1,3 +1,5 @@
+using ChatTwo.Resources;
+
namespace ChatTwo.Code;
internal static class ChatSourceExt {
@@ -13,4 +15,19 @@ internal static class ChatSourceExt {
| ChatSource.PartyPet
| ChatSource.AlliancePet
| ChatSource.OtherPet;
+
+ internal static string Name(this ChatSource source) => source switch {
+ ChatSource.Self => Language.ChatSource_Self,
+ ChatSource.PartyMember => Language.ChatSource_PartyMember,
+ ChatSource.AllianceMember => Language.ChatSource_AllianceMember,
+ ChatSource.Other => Language.ChatSource_Other,
+ ChatSource.EngagedEnemy => Language.ChatSource_EngagedEnemy,
+ ChatSource.UnengagedEnemy => Language.ChatSource_UnengagedEnemy,
+ ChatSource.FriendlyNpc => Language.ChatSource_FriendlyNpc,
+ ChatSource.SelfPet => Language.ChatSource_SelfPet,
+ ChatSource.PartyPet => Language.ChatSource_PartyPet,
+ ChatSource.AlliancePet => Language.ChatSource_AlliancePet,
+ ChatSource.OtherPet => Language.ChatSource_OtherPet,
+ _ => throw new ArgumentOutOfRangeException(nameof(source), source, null),
+ };
}
diff --git a/ChatTwo/Configuration.cs b/ChatTwo/Configuration.cs
index c2773d6..856e632 100755
--- a/ChatTwo/Configuration.cs
+++ b/ChatTwo/Configuration.cs
@@ -61,6 +61,13 @@ internal enum UnreadMode {
}
internal static class UnreadModeExt {
+ internal static string Name(this UnreadMode mode) => mode switch {
+ UnreadMode.All => Language.UnreadMode_All,
+ UnreadMode.Unseen => Language.UnreadMode_Unseen,
+ UnreadMode.None => Language.UnreadMode_None,
+ _ => throw new ArgumentOutOfRangeException(nameof(mode), mode, null),
+ };
+
internal static string? Tooltip(this UnreadMode mode) => mode switch {
UnreadMode.All => Language.UnreadMode_All_Tooltip,
UnreadMode.Unseen => Language.UnreadMode_Unseen_Tooltip,
diff --git a/ChatTwo/Resources/Language.Designer.cs b/ChatTwo/Resources/Language.Designer.cs
index 930fc45..e6e0df9 100755
--- a/ChatTwo/Resources/Language.Designer.cs
+++ b/ChatTwo/Resources/Language.Designer.cs
@@ -114,6 +114,105 @@ namespace ChatTwo.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Alliance Member.
+ ///
+ internal static string ChatSource_AllianceMember {
+ get {
+ return ResourceManager.GetString("ChatSource_AllianceMember", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Pet (Alliance member).
+ ///
+ internal static string ChatSource_AlliancePet {
+ get {
+ return ResourceManager.GetString("ChatSource_AlliancePet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Engaged Enemy.
+ ///
+ internal static string ChatSource_EngagedEnemy {
+ get {
+ return ResourceManager.GetString("ChatSource_EngagedEnemy", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Friendly NPC.
+ ///
+ internal static string ChatSource_FriendlyNpc {
+ get {
+ return ResourceManager.GetString("ChatSource_FriendlyNpc", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Other.
+ ///
+ internal static string ChatSource_Other {
+ get {
+ return ResourceManager.GetString("ChatSource_Other", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Pet (Other).
+ ///
+ internal static string ChatSource_OtherPet {
+ get {
+ return ResourceManager.GetString("ChatSource_OtherPet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Party Member.
+ ///
+ internal static string ChatSource_PartyMember {
+ get {
+ return ResourceManager.GetString("ChatSource_PartyMember", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Pet (Party).
+ ///
+ internal static string ChatSource_PartyPet {
+ get {
+ return ResourceManager.GetString("ChatSource_PartyPet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Self.
+ ///
+ internal static string ChatSource_Self {
+ get {
+ return ResourceManager.GetString("ChatSource_Self", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Pet (Self).
+ ///
+ internal static string ChatSource_SelfPet {
+ get {
+ return ResourceManager.GetString("ChatSource_SelfPet", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Unengaged Enemy.
+ ///
+ internal static string ChatSource_UnengagedEnemy {
+ get {
+ return ResourceManager.GetString("ChatSource_UnengagedEnemy", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Allow moving chat.
///
@@ -501,6 +600,15 @@ namespace ChatTwo.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to All.
+ ///
+ internal static string UnreadMode_All {
+ get {
+ return ResourceManager.GetString("UnreadMode_All", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Always show unread indicators..
///
@@ -510,6 +618,15 @@ namespace ChatTwo.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to None.
+ ///
+ internal static string UnreadMode_None {
+ get {
+ return ResourceManager.GetString("UnreadMode_None", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Never show unread indicators..
///
@@ -519,6 +636,15 @@ namespace ChatTwo.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Unseen.
+ ///
+ internal static string UnreadMode_Unseen {
+ get {
+ return ResourceManager.GetString("UnreadMode_Unseen", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Only show unread indicators for messages you haven't seen..
///
diff --git a/ChatTwo/Resources/Language.resx b/ChatTwo/Resources/Language.resx
index 725d983..1c5d362 100755
--- a/ChatTwo/Resources/Language.resx
+++ b/ChatTwo/Resources/Language.resx
@@ -278,4 +278,46 @@
Announcements
+
+ All
+
+
+ Unseen
+
+
+ None
+
+
+ Self
+
+
+ Party Member
+
+
+ Alliance Member
+
+
+ Other
+
+
+ Engaged Enemy
+
+
+ Unengaged Enemy
+
+
+ Friendly NPC
+
+
+ Pet (Self)
+
+
+ Pet (Party)
+
+
+ Pet (Alliance member)
+
+
+ Pet (Other)
+
diff --git a/ChatTwo/Ui/SettingsTabs/Tabs.cs b/ChatTwo/Ui/SettingsTabs/Tabs.cs
index 63b159f..f111e95 100755
--- a/ChatTwo/Ui/SettingsTabs/Tabs.cs
+++ b/ChatTwo/Ui/SettingsTabs/Tabs.cs
@@ -48,7 +48,7 @@ internal sealed class Tabs : ISettingsTab {
if (ImGui.BeginCombo(Language.Options_Tabs_UnreadMode, tab.UnreadMode.ToString())) {
foreach (var mode in Enum.GetValues()) {
- if (ImGui.Selectable(mode.ToString(), tab.UnreadMode == mode)) {
+ if (ImGui.Selectable(mode.Name(), tab.UnreadMode == mode)) {
tab.UnreadMode = mode;
}
@@ -102,7 +102,7 @@ internal sealed class Tabs : ISettingsTab {
var sources = (uint) sourcesEnum;
foreach (var source in Enum.GetValues()) {
- if (ImGui.CheckboxFlags(source.ToString(), ref sources, (uint) source)) {
+ if (ImGui.CheckboxFlags(source.Name(), ref sources, (uint) source)) {
tab.ChatCodes[type] = (ChatSource) sources;
}
}