mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
WindowSystem: fix clickthrough option not applying to child windows, persist options
Persistence is pretty WIP. I want to offer multiple presets in the future, and save more things like window positions.
This commit is contained in:
parent
49a18e3c1e
commit
35b49823e5
9 changed files with 301 additions and 80 deletions
|
|
@ -27,6 +27,8 @@ using Dalamud.Interface.ManagedFontAtlas.Internals;
|
|||
using Dalamud.Interface.Style;
|
||||
using Dalamud.Interface.Utility;
|
||||
using Dalamud.Interface.Windowing;
|
||||
using Dalamud.Interface.Windowing.Persistence;
|
||||
using Dalamud.IoC.Internal;
|
||||
using Dalamud.Logging.Internal;
|
||||
using Dalamud.Utility;
|
||||
using Dalamud.Utility.Timing;
|
||||
|
|
@ -60,6 +62,7 @@ namespace Dalamud.Interface.Internal;
|
|||
/// This class manages interaction with the ImGui interface.
|
||||
/// </summary>
|
||||
[ServiceManager.EarlyLoadedService]
|
||||
[InherentDependency<WindowSystemPersistence>] // Used by window system windows to restore state from the configuration
|
||||
internal partial class InterfaceManager : IInternalDisposableService
|
||||
{
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -39,18 +39,6 @@ public class SettingsTabExperimental : SettingsTab
|
|||
|
||||
new GapSettingsEntry(5),
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnablePluginUIAdditionalOptions",
|
||||
"Add a button to the title bar of plugin windows to open additional options"),
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnablePluginUIAdditionalOptionsHint",
|
||||
"This will allow you to pin certain plugin windows, make them clickthrough or adjust their opacity.\nThis may not be supported by all of your plugins. Contact the plugin author if you want them to support this feature."),
|
||||
c => c.EnablePluginUiAdditionalOptions,
|
||||
(v, c) => c.EnablePluginUiAdditionalOptions = v),
|
||||
|
||||
new GapSettingsEntry(5),
|
||||
|
||||
new ButtonSettingsEntry(
|
||||
Loc.Localize("DalamudSettingsClearHidden", "Clear hidden plugins"),
|
||||
Loc.Localize(
|
||||
|
|
@ -65,7 +53,7 @@ public class SettingsTabExperimental : SettingsTab
|
|||
new GapSettingsEntry(5, true),
|
||||
|
||||
new DevPluginsSettingsEntry(),
|
||||
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnableImGuiAsserts",
|
||||
|
|
@ -75,7 +63,7 @@ public class SettingsTabExperimental : SettingsTab
|
|||
"If this setting is enabled, a window containing further details will be shown when an internal assertion in ImGui fails.\nWe recommend enabling this when developing plugins."),
|
||||
c => Service<InterfaceManager>.Get().ShowAsserts,
|
||||
(v, _) => Service<InterfaceManager>.Get().ShowAsserts = v),
|
||||
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnableImGuiAssertsAtStartup",
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace Dalamud.Interface.Internal.Windows.Settings.Tabs;
|
|||
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:Elements should be documented", Justification = "Internals")]
|
||||
public class SettingsTabLook : SettingsTab
|
||||
{
|
||||
private static readonly (string, float)[] GlobalUiScalePresets =
|
||||
private static readonly (string, float)[] GlobalUiScalePresets =
|
||||
{
|
||||
("80%##DalamudSettingsGlobalUiScaleReset96", 0.8f),
|
||||
("100%##DalamudSettingsGlobalUiScaleReset12", 1f),
|
||||
|
|
@ -107,7 +107,17 @@ public class SettingsTabLook : SettingsTab
|
|||
Loc.Localize("DalamudSettingToggleDockingHint", "This will allow you to fuse and tab plugin windows."),
|
||||
c => c.IsDocking,
|
||||
(v, c) => c.IsDocking = v),
|
||||
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnablePluginUIAdditionalOptions",
|
||||
"Add a button to the title bar of plugin windows to open additional options"),
|
||||
Loc.Localize(
|
||||
"DalamudSettingEnablePluginUIAdditionalOptionsHint",
|
||||
"This will allow you to pin certain plugin windows, make them clickthrough or adjust their opacity.\nThis may not be supported by all of your plugins. Contact the plugin author if you want them to support this feature."),
|
||||
c => c.EnablePluginUiAdditionalOptions,
|
||||
(v, c) => c.EnablePluginUiAdditionalOptions = v),
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize("DalamudSettingEnablePluginUISoundEffects", "Enable sound effects for plugin windows"),
|
||||
Loc.Localize("DalamudSettingEnablePluginUISoundEffectsHint", "This will allow you to enable or disable sound effects generated by plugin user interfaces.\nThis is affected by your in-game `System Sounds` volume settings."),
|
||||
|
|
@ -125,19 +135,19 @@ public class SettingsTabLook : SettingsTab
|
|||
Loc.Localize("DalamudSettingToggleTsmHint", "This will allow you to access certain Dalamud and Plugin functionality from the title screen.\nDisabling this will also hide the Dalamud version text on the title screen."),
|
||||
c => c.ShowTsm,
|
||||
(v, c) => c.ShowTsm = v),
|
||||
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize("DalamudSettingInstallerOpenDefault", "Open the Plugin Installer to the \"Installed Plugins\" tab by default"),
|
||||
Loc.Localize("DalamudSettingInstallerOpenDefaultHint", "This will allow you to open the Plugin Installer to the \"Installed Plugins\" tab by default, instead of the \"Available Plugins\" tab."),
|
||||
c => c.PluginInstallerOpen == PluginInstallerOpenKind.InstalledPlugins,
|
||||
(v, c) => c.PluginInstallerOpen = v ? PluginInstallerOpenKind.InstalledPlugins : PluginInstallerOpenKind.AllPlugins),
|
||||
|
||||
|
||||
new SettingsEntry<bool>(
|
||||
Loc.Localize("DalamudSettingReducedMotion", "Reduce motions"),
|
||||
Loc.Localize("DalamudSettingReducedMotionHint", "This will suppress certain animations from Dalamud, such as the notification popup."),
|
||||
c => c.ReduceMotions ?? false,
|
||||
(v, c) => c.ReduceMotions = v),
|
||||
|
||||
|
||||
new SettingsEntry<float>(
|
||||
Loc.Localize("DalamudSettingImeStateIndicatorOpacity", "IME State Indicator Opacity (CJK only)"),
|
||||
Loc.Localize("DalamudSettingImeStateIndicatorOpacityHint", "When any of CJK IMEs is in use, the state of IME will be shown with the opacity specified here."),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue