Rename close to hide and change icon

This commit is contained in:
Infi
2024-07-08 12:10:27 +02:00
parent bea2f51192
commit cd750a3ccb
7 changed files with 32 additions and 30 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.27.3</Version>
<Version>1.27.4</Version>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
+1 -1
View File
@@ -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;
+4 -2
View File
@@ -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(
+18 -18
View File
@@ -2831,24 +2831,6 @@ namespace ChatTwo.Resources {
}
}
/// <summary>
/// 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..
/// </summary>
internal static string Options_ShowCloseButton_Description {
get {
return ResourceManager.GetString("Options_ShowCloseButton_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show close button.
/// </summary>
internal static string Options_ShowCloseButton_Name {
get {
return ResourceManager.GetString("Options_ShowCloseButton_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Replaces words with their emote version, currently supports BetterTTV..
/// </summary>
@@ -2867,6 +2849,24 @@ namespace ChatTwo.Resources {
}
}
/// <summary>
/// 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..
/// </summary>
internal static string Options_ShowHideButton_Description {
get {
return ResourceManager.GetString("Options_ShowHideButton_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show hide button.
/// </summary>
internal static string Options_ShowHideButton_Name {
get {
return ResourceManager.GetString("Options_ShowHideButton_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Show the Novice Network join button next to the settings button if logged in as a mentor..
/// </summary>
+4 -4
View File
@@ -163,11 +163,11 @@
<data name="Options_ShowNoviceNetwork_Description">
<value>Show the Novice Network join button next to the settings button if logged in as a mentor.</value>
</data>
<data name="Options_ShowCloseButton_Name" xml:space="preserve">
<value>Show close button</value>
<data name="Options_ShowHideButton_Name" xml:space="preserve">
<value>Show hide button</value>
</data>
<data name="Options_ShowCloseButton_Description" xml:space="preserve">
<value>Show a close button next to the settings button. The chat window can be returned by pressing return or slash to focus it.</value>
<data name="Options_ShowHideButton_Description" xml:space="preserve">
<value>Show a hide button next to the settings button. The chat window can be returned by pressing return or slash to focus it.</value>
</data>
<data name="Options_FontSize_Name">
<value>Font size</value>
+3 -3
View File
@@ -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();
}
+1 -1
View File
@@ -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));