|
Window Framework v1.2.4
Window Framework for Unity UI Toolkit
|
Represents the configuration and runtime data for the Window Framework system, enabling management of UI-related settings such as tooltips, context menus, and theme preferences. More...
Public Member Functions | |
| void | FromDictionary (Dictionary< string, WindowFrameData > dict) |
| Dictionary< string, WindowFrameData > | ToDictionary () |
Public Attributes | |
| int | ActiveThemeIndex |
| Gets or sets the index of the currently active theme in the window framework's theme system. | |
| float | ContentMenuDelay |
| Gets or sets the delay (in seconds) before context menus begin to fade out after being triggered for dismissal. | |
| float | ContentMenuFadeTime |
| Gets or sets the duration (in seconds) for context menu fade animations. | |
| bool | TooltipActive |
| Gets or sets a value indicating whether the tooltip system is enabled and active. | |
| float | TooltipFadeTime |
| Gets or sets the duration (in seconds) for tooltip fade animations. | |
| TooltipFadeType | TooltipFadeType |
| Gets or sets the type of fade animation used for tooltip transitions. | |
| float | TooltipHideDelay |
| Gets or sets the delay (in seconds) before tooltips begin to hide after the cursor leaves the target element. | |
| float | TooltipShowDelay |
| Gets or sets the delay (in seconds) before tooltips appear after the cursor hovers over a target element. | |
| List< WindowFrameDataEntry > | WindowFrameDataList = new List<WindowFrameDataEntry>() |
| Gets or sets the collection of window frame data entries containing all window configurations and states. | |
| bool | WindowMemoryEnabled |
| Gets or sets a value indicating whether window memory and persistence features are enabled. | |
The WindowFrameworkData class serves as the central configuration hub for the entire window framework system. It contains all global settings that affect the behavior and appearance of windows, tooltips, context menus, and other UI elements within the framework.
Primary Responsibilities:
Serialization and Persistence:
This class is designed to be easily serialized for saving and loading framework configuration between application sessions. The window frame data is stored as a list of entries rather than a dictionary to ensure compatibility with Unity's JSON serialization system.
| void GWG.WindowFramework.WindowFrameworkData.FromDictionary | ( | Dictionary< string, WindowFrameData > | dict | ) |
| Dictionary< string, WindowFrameData > GWG.WindowFramework.WindowFrameworkData.ToDictionary | ( | ) |
| int GWG.WindowFramework.WindowFrameworkData.ActiveThemeIndex |
An integer representing the zero-based index of the active theme. Must be a valid index within the available themes collection.
This property controls which visual theme is applied to all windows and UI elements within the framework. Themes typically include color schemes, fonts, spacing, and other visual styling properties that provide consistent appearance across the application.
| float GWG.WindowFramework.WindowFrameworkData.ContentMenuDelay |
A float value representing the delay in seconds before context menu fade-out begins. Typical values range from 0.0f to 3.0f seconds.
This delay provides users with a grace period to move their cursor back to the context menu if they accidentally move away from it. It prevents menus from disappearing too quickly when users are trying to navigate to menu items.
| float GWG.WindowFramework.WindowFrameworkData.ContentMenuFadeTime |
A float value representing the time in seconds for context menu fade transitions. Typical values range from 0.1f to 1.0f seconds.
This property controls how long context menus take to fade in when appearing and fade out when disappearing. A shorter duration creates snappy, responsive menus, while a longer duration provides smoother, more polished transitions.
| bool GWG.WindowFramework.WindowFrameworkData.TooltipActive |
true if tooltips are enabled and will be displayed when appropriate; false if the tooltip system is disabled and no tooltips will appear.
This global switch allows for complete enabling or disabling of the tooltip system throughout the entire window framework. When disabled, no tooltips will be processed or displayed, regardless of individual element tooltip configurations.
| float GWG.WindowFramework.WindowFrameworkData.TooltipFadeTime |
A float value representing the time in seconds for tooltip fade transitions. Typical values range from 0.1f to 0.8f seconds.
This property determines how quickly tooltips fade in when appearing and fade out when disappearing. The fade time affects the perceived responsiveness and polish of the interface. The fade behavior is controlled by the TooltipFadeType property.
| TooltipFadeType GWG.WindowFramework.WindowFrameworkData.TooltipFadeType |
A TooltipFadeType enumeration value that specifies the animation type for tooltip appearance and disappearance effects.
This property determines the visual style of tooltip animations. Different fade types may be more appropriate for different tooltip styles and content types. The fade type works in conjunction with TooltipFadeTime to create the complete animation effect.
| float GWG.WindowFramework.WindowFrameworkData.TooltipHideDelay |
A float value representing the delay in seconds before tooltip hiding begins. Typical values range from 0.0f to 1.0f seconds.
This delay provides a grace period that allows users to move their cursor from the trigger element to the tooltip itself (if the tooltip is interactive) or gives users time to finish reading the tooltip content before it disappears.
| float GWG.WindowFramework.WindowFrameworkData.TooltipShowDelay |
A float value representing the hover delay in seconds before tooltip display begins. Typical values range from 0.3f to 2.0f seconds.
This delay prevents tooltips from appearing immediately when the cursor briefly passes over elements, reducing visual noise and distraction. The delay should be long enough to avoid accidental tooltip triggers but short enough to be responsive to intentional hovering.
| List<WindowFrameDataEntry> GWG.WindowFramework.WindowFrameworkData.WindowFrameDataList = new List<WindowFrameDataEntry>() |
A List<T> of WindowFrameDataEntry objects, each containing a key-value pair of window identifiers and their corresponding WindowFrameData.
This list serves as the primary storage for all window frame configurations within the framework. It's implemented as a list of entries rather than a dictionary to ensure compatibility with Unity's JSON serialization system, which doesn't natively support dictionary serialization.
| bool GWG.WindowFramework.WindowFrameworkData.WindowMemoryEnabled |
true if window positions, sizes, and states should be remembered and restored; false if windows should always use their default configurations.
When window memory is enabled, the framework will automatically save and restore window positions, sizes, visibility states, and other window-specific settings between application sessions.