feat: add autohide after inactivity

After not receiving a message for X seconds (configurable) in the
current tab or any tab with unread mode enabled, the chat will be
hidden. Focus can be returned with return or slash as usual.

Having input focus or hovering the mouse over the chat window "bumps"
it every frame.

Also fixes a bug that prevented focus from being restored to tabs with
input disabled. The chat window will be brought back but the activated
event won't be fully processed.

Co-authored-by: Auri <me@aurieh.me>
This commit is contained in:
Dean Sheather
2024-07-11 15:50:17 +10:00
parent 05495705fd
commit c3c60e7e43
6 changed files with 115 additions and 10 deletions
+36
View File
@@ -2417,6 +2417,24 @@ namespace ChatTwo.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Hide the chat after a configurable period of inactivity. The current tab and any tabs with unread indicators enabled are considered for activity..
/// </summary>
internal static string Options_HideWhenInactive_Description {
get {
return ResourceManager.GetString("Options_HideWhenInactive_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hide when inactive.
/// </summary>
internal static string Options_HideWhenInactive_Name {
get {
return ResourceManager.GetString("Options_HideWhenInactive_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Hide {0} when you are not logged in to a character..
/// </summary>
@@ -2453,6 +2471,24 @@ namespace ChatTwo.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to How long to wait (in seconds) before considering the chat log inactive..
/// </summary>
internal static string Options_InactivityHideTimeout_Description {
get {
return ResourceManager.GetString("Options_InactivityHideTimeout_Description", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Inactivity timeout.
/// </summary>
internal static string Options_InactivityHideTimeout_Name {
get {
return ResourceManager.GetString("Options_InactivityHideTimeout_Name", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to The font {0} will use to display Japanese text..
/// </summary>