feat: add option to hide when not logged in
This commit is contained in:
parent
b2546c439e
commit
b82cb7b462
|
@ -14,6 +14,7 @@ internal class Configuration : IPluginConfiguration {
|
|||
|
||||
public bool HideChat = true;
|
||||
public bool HideDuringCutscenes = true;
|
||||
public bool HideWhenNotLoggedIn = true;
|
||||
public bool NativeItemTooltips = true;
|
||||
public bool PrettierTimestamps = true;
|
||||
public bool MoreCompactPretty;
|
||||
|
@ -36,6 +37,7 @@ internal class Configuration : IPluginConfiguration {
|
|||
internal void UpdateFrom(Configuration other) {
|
||||
this.HideChat = other.HideChat;
|
||||
this.HideDuringCutscenes = other.HideDuringCutscenes;
|
||||
this.HideWhenNotLoggedIn = other.HideWhenNotLoggedIn;
|
||||
this.NativeItemTooltips = other.NativeItemTooltips;
|
||||
this.PrettierTimestamps = other.PrettierTimestamps;
|
||||
this.MoreCompactPretty = other.MoreCompactPretty;
|
||||
|
|
|
@ -357,6 +357,24 @@ namespace ChatTwo.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hide the chat when you are not logged in to a character..
|
||||
/// </summary>
|
||||
internal static string Options_HideWhenNotLoggedIn_Description {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_HideWhenNotLoggedIn_Description", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hide when not logged in.
|
||||
/// </summary>
|
||||
internal static string Options_HideWhenNotLoggedIn_Name {
|
||||
get {
|
||||
return ResourceManager.GetString("Options_HideWhenNotLoggedIn_Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The font Chat 2 will use to display Japanese text..
|
||||
/// </summary>
|
||||
|
|
|
@ -353,4 +353,10 @@
|
|||
<data name="ChatLog_Tabs_Delete" xml:space="preserve">
|
||||
<value>Delete tab</value>
|
||||
</data>
|
||||
<data name="Options_HideWhenNotLoggedIn_Name" xml:space="preserve">
|
||||
<value>Hide when not logged in</value>
|
||||
</data>
|
||||
<data name="Options_HideWhenNotLoggedIn_Description" xml:space="preserve">
|
||||
<value>Hide the chat when you are not logged in to a character.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -296,6 +296,10 @@ internal sealed class ChatLog : IUiComponent {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.Ui.Plugin.Config.HideWhenNotLoggedIn && !this.Ui.Plugin.ClientState.IsLoggedIn) {
|
||||
return;
|
||||
}
|
||||
|
||||
var flags = ImGuiWindowFlags.None;
|
||||
if (!this.Ui.Plugin.Config.CanMove) {
|
||||
flags |= ImGuiWindowFlags.NoMove;
|
||||
|
|
|
@ -22,6 +22,9 @@ internal sealed class Display : ISettingsTab {
|
|||
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideDuringCutscenes, Language.Options_HideDuringCutscenes_Name, Language.Options_HideDuringCutscenes_Description);
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideWhenNotLoggedIn, Language.Options_HideWhenNotLoggedIn_Name, Language.Options_HideWhenNotLoggedIn_Description);
|
||||
ImGui.Spacing();
|
||||
|
||||
ImGuiUtil.OptionCheckbox(ref this.Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, Language.Options_NativeItemTooltips_Description);
|
||||
ImGui.Spacing();
|
||||
|
||||
|
|
Loading…
Reference in New Issue