feat: add option to hide when not logged in
This commit is contained in:
@@ -14,6 +14,7 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
|
|
||||||
public bool HideChat = true;
|
public bool HideChat = true;
|
||||||
public bool HideDuringCutscenes = true;
|
public bool HideDuringCutscenes = true;
|
||||||
|
public bool HideWhenNotLoggedIn = true;
|
||||||
public bool NativeItemTooltips = true;
|
public bool NativeItemTooltips = true;
|
||||||
public bool PrettierTimestamps = true;
|
public bool PrettierTimestamps = true;
|
||||||
public bool MoreCompactPretty;
|
public bool MoreCompactPretty;
|
||||||
@@ -36,6 +37,7 @@ internal class Configuration : IPluginConfiguration {
|
|||||||
internal void UpdateFrom(Configuration other) {
|
internal void UpdateFrom(Configuration other) {
|
||||||
this.HideChat = other.HideChat;
|
this.HideChat = other.HideChat;
|
||||||
this.HideDuringCutscenes = other.HideDuringCutscenes;
|
this.HideDuringCutscenes = other.HideDuringCutscenes;
|
||||||
|
this.HideWhenNotLoggedIn = other.HideWhenNotLoggedIn;
|
||||||
this.NativeItemTooltips = other.NativeItemTooltips;
|
this.NativeItemTooltips = other.NativeItemTooltips;
|
||||||
this.PrettierTimestamps = other.PrettierTimestamps;
|
this.PrettierTimestamps = other.PrettierTimestamps;
|
||||||
this.MoreCompactPretty = other.MoreCompactPretty;
|
this.MoreCompactPretty = other.MoreCompactPretty;
|
||||||
|
|||||||
Generated
+18
@@ -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>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to The font Chat 2 will use to display Japanese text..
|
/// Looks up a localized string similar to The font Chat 2 will use to display Japanese text..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -353,4 +353,10 @@
|
|||||||
<data name="ChatLog_Tabs_Delete" xml:space="preserve">
|
<data name="ChatLog_Tabs_Delete" xml:space="preserve">
|
||||||
<value>Delete tab</value>
|
<value>Delete tab</value>
|
||||||
</data>
|
</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>
|
</root>
|
||||||
|
|||||||
@@ -296,6 +296,10 @@ internal sealed class ChatLog : IUiComponent {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.Ui.Plugin.Config.HideWhenNotLoggedIn && !this.Ui.Plugin.ClientState.IsLoggedIn) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var flags = ImGuiWindowFlags.None;
|
var flags = ImGuiWindowFlags.None;
|
||||||
if (!this.Ui.Plugin.Config.CanMove) {
|
if (!this.Ui.Plugin.Config.CanMove) {
|
||||||
flags |= ImGuiWindowFlags.NoMove;
|
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);
|
ImGuiUtil.OptionCheckbox(ref this.Mutable.HideDuringCutscenes, Language.Options_HideDuringCutscenes_Name, Language.Options_HideDuringCutscenes_Description);
|
||||||
ImGui.Spacing();
|
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);
|
ImGuiUtil.OptionCheckbox(ref this.Mutable.NativeItemTooltips, Language.Options_NativeItemTooltips_Name, Language.Options_NativeItemTooltips_Description);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user