feat: add option to hide when game ui is hidden
This commit is contained in:
parent
59bf7edfb4
commit
598901d2f9
|
@ -15,6 +15,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 HideWhenNotLoggedIn = true;
|
||||||
|
public bool HideWhenUiHidden = true;
|
||||||
public bool NativeItemTooltips = true;
|
public bool NativeItemTooltips = true;
|
||||||
public bool PrettierTimestamps = true;
|
public bool PrettierTimestamps = true;
|
||||||
public bool MoreCompactPretty;
|
public bool MoreCompactPretty;
|
||||||
|
@ -39,6 +40,7 @@ internal class Configuration : IPluginConfiguration {
|
||||||
this.HideChat = other.HideChat;
|
this.HideChat = other.HideChat;
|
||||||
this.HideDuringCutscenes = other.HideDuringCutscenes;
|
this.HideDuringCutscenes = other.HideDuringCutscenes;
|
||||||
this.HideWhenNotLoggedIn = other.HideWhenNotLoggedIn;
|
this.HideWhenNotLoggedIn = other.HideWhenNotLoggedIn;
|
||||||
|
this.HideWhenUiHidden = other.HideWhenUiHidden;
|
||||||
this.NativeItemTooltips = other.NativeItemTooltips;
|
this.NativeItemTooltips = other.NativeItemTooltips;
|
||||||
this.PrettierTimestamps = other.PrettierTimestamps;
|
this.PrettierTimestamps = other.PrettierTimestamps;
|
||||||
this.MoreCompactPretty = other.MoreCompactPretty;
|
this.MoreCompactPretty = other.MoreCompactPretty;
|
||||||
|
|
|
@ -88,10 +88,8 @@ internal sealed class PluginUi : IDisposable {
|
||||||
);
|
);
|
||||||
|
|
||||||
var uiBuilder = this.Plugin.Interface.UiBuilder;
|
var uiBuilder = this.Plugin.Interface.UiBuilder;
|
||||||
uiBuilder.DisableAutomaticUiHide = true;
|
|
||||||
uiBuilder.DisableCutsceneUiHide = true;
|
uiBuilder.DisableCutsceneUiHide = true;
|
||||||
uiBuilder.DisableGposeUiHide = true;
|
uiBuilder.DisableGposeUiHide = true;
|
||||||
uiBuilder.DisableUserUiHide = true;
|
|
||||||
|
|
||||||
uiBuilder.BuildFonts += this.BuildFonts;
|
uiBuilder.BuildFonts += this.BuildFonts;
|
||||||
uiBuilder.Draw += this.Draw;
|
uiBuilder.Draw += this.Draw;
|
||||||
|
@ -117,6 +115,7 @@ internal sealed class PluginUi : IDisposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Draw() {
|
private void Draw() {
|
||||||
|
this.Plugin.Interface.UiBuilder.DisableUserUiHide = !this.Plugin.Config.HideWhenUiHidden;
|
||||||
this.DefaultText = ImGui.GetStyle().Colors[(int) ImGuiCol.Text];
|
this.DefaultText = ImGui.GetStyle().Colors[(int) ImGuiCol.Text];
|
||||||
|
|
||||||
var font = this.RegularFont.HasValue;
|
var font = this.RegularFont.HasValue;
|
||||||
|
|
18
ChatTwo/Resources/Language.Designer.cs
generated
18
ChatTwo/Resources/Language.Designer.cs
generated
|
@ -465,6 +465,24 @@ namespace ChatTwo.Resources {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Hide {0} when the game UI is hidden..
|
||||||
|
/// </summary>
|
||||||
|
internal static string Options_HideWhenUiHidden_Description {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Options_HideWhenUiHidden_Description", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Hide when game UI is hidden.
|
||||||
|
/// </summary>
|
||||||
|
internal static string Options_HideWhenUiHidden_Name {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Options_HideWhenUiHidden_Name", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to The font {0} will use to display Japanese text..
|
/// Looks up a localized string similar to The font {0} will use to display Japanese text..
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -401,4 +401,10 @@
|
||||||
<data name="Options_CommandHelpSide_Description" xml:space="preserve">
|
<data name="Options_CommandHelpSide_Description" xml:space="preserve">
|
||||||
<value>The side of {0} to display help for commands on.</value>
|
<value>The side of {0} to display help for commands on.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Options_HideWhenUiHidden_Name" xml:space="preserve">
|
||||||
|
<value>Hide when game UI is hidden</value>
|
||||||
|
</data>
|
||||||
|
<data name="Options_HideWhenUiHidden_Description" xml:space="preserve">
|
||||||
|
<value>Hide {0} when the game UI is hidden.</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|
|
@ -33,6 +33,13 @@ internal sealed class Display : ISettingsTab {
|
||||||
);
|
);
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
|
|
||||||
|
ImGuiUtil.OptionCheckbox(
|
||||||
|
ref this.Mutable.HideWhenUiHidden,
|
||||||
|
Language.Options_HideWhenUiHidden_Name,
|
||||||
|
string.Format(Language.Options_HideWhenUiHidden_Description, Plugin.PluginName)
|
||||||
|
);
|
||||||
|
ImGui.Spacing();
|
||||||
|
|
||||||
ImGuiUtil.OptionCheckbox(
|
ImGuiUtil.OptionCheckbox(
|
||||||
ref this.Mutable.NativeItemTooltips,
|
ref this.Mutable.NativeItemTooltips,
|
||||||
Language.Options_NativeItemTooltips_Name,
|
Language.Options_NativeItemTooltips_Name,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user