Rename close to hide and change icon
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Version>1.27.3</Version>
|
<Version>1.27.4</Version>
|
||||||
<TargetFramework>net8.0-windows</TargetFramework>
|
<TargetFramework>net8.0-windows</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ internal class Configuration : IPluginConfiguration
|
|||||||
public bool HideWhenUiHidden = true;
|
public bool HideWhenUiHidden = true;
|
||||||
public bool HideInLoadingScreens;
|
public bool HideInLoadingScreens;
|
||||||
public bool HideInBattle;
|
public bool HideInBattle;
|
||||||
public bool ShowCloseButton = true;
|
public bool ShowHideButton = true;
|
||||||
public bool NativeItemTooltips = true;
|
public bool NativeItemTooltips = true;
|
||||||
public bool PrettierTimestamps = true;
|
public bool PrettierTimestamps = true;
|
||||||
public bool MoreCompactPretty;
|
public bool MoreCompactPretty;
|
||||||
|
|||||||
@@ -174,8 +174,10 @@ public class FontManager
|
|||||||
});
|
});
|
||||||
|
|
||||||
FontAwesome = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(e =>
|
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(
|
RegularFont = Plugin.Interface.UiBuilder.FontAtlas.NewDelegateFontHandle(
|
||||||
e => e.OnPreBuild(
|
e => e.OnPreBuild(
|
||||||
|
|||||||
Generated
+18
-18
@@ -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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Replaces words with their emote version, currently supports BetterTTV..
|
/// Looks up a localized string similar to Replaces words with their emote version, currently supports BetterTTV..
|
||||||
/// </summary>
|
/// </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>
|
/// <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..
|
/// 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>
|
/// </summary>
|
||||||
|
|||||||
@@ -163,11 +163,11 @@
|
|||||||
<data name="Options_ShowNoviceNetwork_Description">
|
<data name="Options_ShowNoviceNetwork_Description">
|
||||||
<value>Show the Novice Network join button next to the settings button if logged in as a mentor.</value>
|
<value>Show the Novice Network join button next to the settings button if logged in as a mentor.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Options_ShowCloseButton_Name" xml:space="preserve">
|
<data name="Options_ShowHideButton_Name" xml:space="preserve">
|
||||||
<value>Show close button</value>
|
<value>Show hide button</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Options_ShowCloseButton_Description" xml:space="preserve">
|
<data name="Options_ShowHideButton_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>
|
<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>
|
||||||
<data name="Options_FontSize_Name">
|
<data name="Options_FontSize_Name">
|
||||||
<value>Font size</value>
|
<value>Font size</value>
|
||||||
|
|||||||
@@ -662,7 +662,7 @@ public sealed class ChatLogWindow : Window
|
|||||||
|
|
||||||
var buttonWidth = afterIcon.X - beforeIcon.X;
|
var buttonWidth = afterIcon.X - beforeIcon.X;
|
||||||
var showNovice = Plugin.Config.ShowNoviceNetwork && GameFunctions.GameFunctions.IsMentor();
|
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 inputWidth = ImGui.GetContentRegionAvail().X - buttonWidth * (1 + buttonsRight);
|
||||||
|
|
||||||
var inputType = TempChannel?.ToChatType() ?? activeTab?.Channel?.ToChatType() ?? Plugin.Functions.Chat.Channel.Channel.ToChatType();
|
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))
|
if (ImGuiUtil.IconButton(FontAwesomeIcon.Cog, width: (int)buttonWidth))
|
||||||
Plugin.SettingsWindow.Toggle();
|
Plugin.SettingsWindow.Toggle();
|
||||||
|
|
||||||
if (Plugin.Config.ShowCloseButton)
|
if (Plugin.Config.ShowHideButton)
|
||||||
{
|
{
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
if (ImGuiUtil.IconButton(FontAwesomeIcon.Times, width: (int)buttonWidth))
|
if (ImGuiUtil.IconButton(FontAwesomeIcon.EyeSlash, width: (int)buttonWidth))
|
||||||
UserHide();
|
UserHide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ internal sealed class ChatLog : ISettingsTab
|
|||||||
ImGuiUtil.OptionCheckbox(ref Mutable.ShowNoviceNetwork, Language.Options_ShowNoviceNetwork_Name, Language.Options_ShowNoviceNetwork_Description);
|
ImGuiUtil.OptionCheckbox(ref Mutable.ShowNoviceNetwork, Language.Options_ShowNoviceNetwork_Name, Language.Options_ShowNoviceNetwork_Description);
|
||||||
ImGui.Spacing();
|
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();
|
ImGui.Spacing();
|
||||||
|
|
||||||
ImGuiUtil.OptionCheckbox(ref Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, string.Format(Language.Options_NativeItemTooltips_Description, Plugin.PluginName));
|
ImGuiUtil.OptionCheckbox(ref Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, string.Format(Language.Options_NativeItemTooltips_Description, Plugin.PluginName));
|
||||||
|
|||||||
Reference in New Issue
Block a user