diff --git a/ChatTwo/ChatTwo.csproj b/ChatTwo/ChatTwo.csproj index fd192cd..c15de2a 100755 --- a/ChatTwo/ChatTwo.csproj +++ b/ChatTwo/ChatTwo.csproj @@ -1,6 +1,6 @@ - 1.27.3 + 1.27.4 net8.0-windows enable enable diff --git a/ChatTwo/Configuration.cs b/ChatTwo/Configuration.cs index 3b96a9c..dfcf226 100755 --- a/ChatTwo/Configuration.cs +++ b/ChatTwo/Configuration.cs @@ -20,7 +20,7 @@ internal class Configuration : IPluginConfiguration public bool HideWhenUiHidden = true; public bool HideInLoadingScreens; public bool HideInBattle; - public bool ShowCloseButton = true; + public bool ShowHideButton = true; public bool NativeItemTooltips = true; public bool PrettierTimestamps = true; public bool MoreCompactPretty; diff --git a/ChatTwo/FontManager.cs b/ChatTwo/FontManager.cs index f8b9626..6bca950 100644 --- a/ChatTwo/FontManager.cs +++ b/ChatTwo/FontManager.cs @@ -174,8 +174,10 @@ public class FontManager }); FontAwesome = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(e => - e.OnPreBuild(tk => tk.AddFontAwesomeIconFont(new SafeFontConfig { SizePx = Plugin.Config.FontSize }) - )); + { + e.OnPreBuild(tk => tk.AddFontAwesomeIconFont(new SafeFontConfig { SizePx = Plugin.Config.FontSize })); + e.OnPostBuild(tk => tk.FitRatio(tk.Font)); + }); RegularFont = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle( e => e.OnPreBuild( diff --git a/ChatTwo/Resources/Language.Designer.cs b/ChatTwo/Resources/Language.Designer.cs index a4fc93a..022c8ac 100755 --- a/ChatTwo/Resources/Language.Designer.cs +++ b/ChatTwo/Resources/Language.Designer.cs @@ -2831,24 +2831,6 @@ namespace ChatTwo.Resources { } } - /// - /// Looks up a localized string similar to Show a close button next to the settings button. The chat window can be returned by pressing return or slash to focus it.. - /// - internal static string Options_ShowCloseButton_Description { - get { - return ResourceManager.GetString("Options_ShowCloseButton_Description", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Show close button. - /// - internal static string Options_ShowCloseButton_Name { - get { - return ResourceManager.GetString("Options_ShowCloseButton_Name", resourceCulture); - } - } - /// /// Looks up a localized string similar to Replaces words with their emote version, currently supports BetterTTV.. /// @@ -2867,6 +2849,24 @@ namespace ChatTwo.Resources { } } + /// + /// Looks up a localized string similar to Show a hide button next to the settings button. The chat window can be returned by pressing return or slash to focus it.. + /// + internal static string Options_ShowHideButton_Description { + get { + return ResourceManager.GetString("Options_ShowHideButton_Description", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Show hide button. + /// + internal static string Options_ShowHideButton_Name { + get { + return ResourceManager.GetString("Options_ShowHideButton_Name", resourceCulture); + } + } + /// /// Looks up a localized string similar to Show the Novice Network join button next to the settings button if logged in as a mentor.. /// diff --git a/ChatTwo/Resources/Language.resx b/ChatTwo/Resources/Language.resx index 5f83775..f535927 100644 --- a/ChatTwo/Resources/Language.resx +++ b/ChatTwo/Resources/Language.resx @@ -163,11 +163,11 @@ Show the Novice Network join button next to the settings button if logged in as a mentor. - - Show close button + + Show hide button - - Show a close button next to the settings button. The chat window can be returned by pressing return or slash to focus it. + + Show a hide button next to the settings button. The chat window can be returned by pressing return or slash to focus it. Font size diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index 44ea23e..74ac4dd 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -662,7 +662,7 @@ public sealed class ChatLogWindow : Window var buttonWidth = afterIcon.X - beforeIcon.X; var showNovice = Plugin.Config.ShowNoviceNetwork && GameFunctions.GameFunctions.IsMentor(); - var buttonsRight = (showNovice ? 1 : 0) + (Plugin.Config.ShowCloseButton ? 1 : 0); + var buttonsRight = (showNovice ? 1 : 0) + (Plugin.Config.ShowHideButton ? 1 : 0); var inputWidth = ImGui.GetContentRegionAvail().X - buttonWidth * (1 + buttonsRight); var inputType = TempChannel?.ToChatType() ?? activeTab?.Channel?.ToChatType() ?? Plugin.Functions.Chat.Channel.Channel.ToChatType(); @@ -778,10 +778,10 @@ public sealed class ChatLogWindow : Window if (ImGuiUtil.IconButton(FontAwesomeIcon.Cog, width: (int)buttonWidth)) Plugin.SettingsWindow.Toggle(); - if (Plugin.Config.ShowCloseButton) + if (Plugin.Config.ShowHideButton) { ImGui.SameLine(); - if (ImGuiUtil.IconButton(FontAwesomeIcon.Times, width: (int)buttonWidth)) + if (ImGuiUtil.IconButton(FontAwesomeIcon.EyeSlash, width: (int)buttonWidth)) UserHide(); } diff --git a/ChatTwo/Ui/SettingsTabs/ChatLog.cs b/ChatTwo/Ui/SettingsTabs/ChatLog.cs index a4e3f44..2948a5b 100644 --- a/ChatTwo/Ui/SettingsTabs/ChatLog.cs +++ b/ChatTwo/Ui/SettingsTabs/ChatLog.cs @@ -35,7 +35,7 @@ internal sealed class ChatLog : ISettingsTab ImGuiUtil.OptionCheckbox(ref Mutable.ShowNoviceNetwork, Language.Options_ShowNoviceNetwork_Name, Language.Options_ShowNoviceNetwork_Description); ImGui.Spacing(); - ImGuiUtil.OptionCheckbox(ref Mutable.ShowCloseButton, Language.Options_ShowCloseButton_Name, Language.Options_ShowCloseButton_Description); + ImGuiUtil.OptionCheckbox(ref Mutable.ShowHideButton, Language.Options_ShowHideButton_Name, Language.Options_ShowHideButton_Description); ImGui.Spacing(); ImGuiUtil.OptionCheckbox(ref Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, string.Format(Language.Options_NativeItemTooltips_Description, Plugin.PluginName));