Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ChatTwo/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ internal class Configuration : IPluginConfiguration
public bool HideWhenUiHidden = true;
public bool HideInLoadingScreens;
public bool HideInBattle;
public bool HideInNewGamePlusMenu;
public bool HideWhenInactive;
public int InactivityHideTimeout = 10;
public bool InactivityHideActiveDuringBattle = true;
Expand Down Expand Up @@ -135,6 +136,7 @@ internal void UpdateFrom(Configuration other, bool backToOriginal)
HideWhenUiHidden = other.HideWhenUiHidden;
HideInLoadingScreens = other.HideInLoadingScreens;
HideInBattle = other.HideInBattle;
HideInNewGamePlusMenu = other.HideInNewGamePlusMenu;
HideWhenInactive = other.HideWhenInactive;
InactivityHideTimeout = other.InactivityHideTimeout;
InactivityHideActiveDuringBattle = other.InactivityHideActiveDuringBattle;
Expand Down Expand Up @@ -248,6 +250,7 @@ internal class Tab
public bool HideWhenUiHidden = true;
public bool HideInLoadingScreens;
public bool HideInBattle;
public bool HideInNewGamePlusMenu;
public bool HideWhenInactive;

[NonSerialized] public uint Unread;
Expand Down Expand Up @@ -301,6 +304,7 @@ internal Tab Clone()
HideWhenUiHidden = HideWhenUiHidden,
HideInLoadingScreens = HideInLoadingScreens,
HideInBattle = HideInBattle,
HideInNewGamePlusMenu = HideInNewGamePlusMenu,
HideWhenInactive = HideWhenInactive,
};
}
Expand Down
18 changes: 18 additions & 0 deletions ChatTwo/Resources/Language.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ChatTwo/Resources/Language.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1183,6 +1183,12 @@
<data name="Options_HideInBattle_Description" xml:space="preserve">
<value>Hide the chat during battles.</value>
</data>
<data name="Options_HideInNewGamePlusMenu_Name" xml:space="preserve">
<value>Hide when New Game+ is open.</value>
</data>
<data name="Options_HideInNewGamePlusMenu_Description" xml:space="preserve">
<value>Hide Chat 2 when the New Game+ menu is open.</value>
</data>
<data name="Options_Emote_EmoteStats" xml:space="preserve">
<value>Emote Stats</value>
</data>
Expand Down
12 changes: 10 additions & 2 deletions ChatTwo/Ui/ChatLogWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ private enum HideState
Cutscene,
CutsceneOverride,
User,
Battle
Battle,
NewGamePlus,
}

private HideState CurrentHideState = HideState.None;
Expand All @@ -410,6 +411,13 @@ public void HideStateCheck()
CurrentHideState = HideState.Cutscene;
}

var newGamePlusOpen = GameFunctions.GameFunctions.IsAddonInteractable("QuestRedo");
if (Plugin.Config.HideInNewGamePlusMenu && CurrentHideState == HideState.None && newGamePlusOpen)
CurrentHideState = HideState.NewGamePlus;

if (CurrentHideState is HideState.NewGamePlus && !newGamePlusOpen)
CurrentHideState = HideState.None;

// if the chat is hidden because of a cutscene and no longer in a cutscene, set the hide state to none
if (CurrentHideState is HideState.Cutscene or HideState.CutsceneOverride && !Plugin.CutsceneActive && !Plugin.GposeActive)
CurrentHideState = HideState.None;
Expand All @@ -422,7 +430,7 @@ public void HideStateCheck()
if (CurrentHideState == HideState.User && Activate)
CurrentHideState = HideState.None;

if (CurrentHideState is HideState.Cutscene or HideState.User or HideState.Battle || (Plugin.Config.HideWhenNotLoggedIn && !Plugin.ClientState.IsLoggedIn))
if (CurrentHideState is HideState.Cutscene or HideState.User or HideState.Battle or HideState.NewGamePlus || (Plugin.Config.HideWhenNotLoggedIn && !Plugin.ClientState.IsLoggedIn))
{
IsHidden = true;
return;
Expand Down
13 changes: 11 additions & 2 deletions ChatTwo/Ui/Popout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ private enum HideState
Cutscene,
CutsceneOverride,
User,
Battle
Battle,
NewGamePlus,
}

private HideState CurrentHideState = HideState.None;
Expand All @@ -137,6 +138,14 @@ private bool HideStateCheck()
CurrentHideState = HideState.Cutscene;
}

var newGamePlusOpen = GameFunctions.GameFunctions.IsAddonInteractable("QuestRedo");
if (Tab.HideInNewGamePlusMenu && CurrentHideState == HideState.None && newGamePlusOpen)
CurrentHideState = HideState.NewGamePlus;

if (CurrentHideState is HideState.NewGamePlus && !newGamePlusOpen)
CurrentHideState = HideState.None;


// if the chat is hidden because of a cutscene and no longer in a cutscene, set the hide state to none
if (CurrentHideState is HideState.Cutscene or HideState.CutsceneOverride && !Plugin.CutsceneActive && !Plugin.GposeActive)
CurrentHideState = HideState.None;
Expand All @@ -149,6 +158,6 @@ private bool HideStateCheck()
if (CurrentHideState == HideState.User && ChatLogWindow.Activate)
CurrentHideState = HideState.None;

return CurrentHideState is HideState.Cutscene or HideState.User or HideState.Battle || (Tab.HideWhenNotLoggedIn && !Plugin.ClientState.IsLoggedIn);
return CurrentHideState is HideState.Cutscene or HideState.User or HideState.Battle or HideState.NewGamePlus || (Tab.HideWhenNotLoggedIn && !Plugin.ClientState.IsLoggedIn);
}
}
3 changes: 3 additions & 0 deletions ChatTwo/Ui/SettingsTabs/Display.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public void Draw(bool changed)
ImGuiUtil.OptionCheckbox(ref Mutable.HideInBattle, Language.Options_HideInBattle_Name, Language.Options_HideInBattle_Description);
ImGui.Spacing();

ImGuiUtil.OptionCheckbox(ref Mutable.HideInNewGamePlusMenu, Language.Options_HideInNewGamePlusMenu_Name, Language.Options_HideInNewGamePlusMenu_Description);
ImGui.Spacing();

ImGui.Separator();
ImGui.Spacing();

Expand Down
3 changes: 3 additions & 0 deletions ChatTwo/Ui/SettingsTabs/Tabs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public void Draw(bool changed)

ImGuiUtil.OptionCheckbox(ref tab.HideInBattle, Language.Options_HideInBattle_Name);
ImGui.Spacing();

ImGuiUtil.OptionCheckbox(ref tab.HideInNewGamePlusMenu, Language.Options_HideInNewGamePlusMenu_Name);
ImGui.Spacing();
}

ImGuiUtil.OptionCheckbox(ref tab.CanMove, Language.Popout_CanMove_Name);
Expand Down