AplosWindowSettings
AplosWindowSettings is the single source of truth for the shared window settings — the bar
colours, the resize bounds, the logo presentation, and the window scale. It is a
MonoBehaviour singleton (namespace AplosConsole.Windows.Components) that implements
IColorSettingsApplicable and ISettingsApplicable.
It is scanned as a DebugGroup named "Window Bar".
Inheritance
object
↳ Object
↳ Component
↳ Behaviour
↳ MonoBehaviour
↳ AplosWindowSettings
Inherited Members:
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.Invoke(string, float)MonoBehaviour.InvokeRepeating(string, float, float)MonoBehaviour.CancelInvoke(string)MonoBehaviour.StartCoroutine(IEnumerator)MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()Behaviour.enabledComponent.gameObjectComponent.transformObject.name- …
Namespace: AplosConsole.Windows.Components
Implements: IColorSettingsApplicable, ISettingsApplicable
Properties
| Name | Data Type | Description |
|---|---|---|
Instance |
AplosWindowSettings |
Static singleton accessor. Returns the existing instance, otherwise finds one in the scene, otherwise creates a new GameObject carrying the component. Read-only. |
barBackgroundColor |
Color |
Colour applied to the window bar background. |
closeButtonColor |
Color |
Colour applied to the close button. |
collapseButtonColor |
Color |
Colour applied to the collapse button. |
settingsButtonColor |
Color |
Colour applied to the settings button. |
MinWidth |
int |
Minimum window width (resize lower bound). Range 200–1080. |
MaxWidth |
int |
Maximum window width (resize upper bound). Range 200–1080. |
MinHeight |
int |
Minimum window height (resize lower bound). Range 200–1080. |
MaxHeight |
int |
Maximum window height (resize upper bound). Range 200–1080. |
SmallLogoWidthThreshold |
float |
Window width below which the compact logo is shown. Range 300–1080. |
ScaledCanvas |
Canvas |
The Canvas whose reference resolution is scaled by WindowScale. |
WindowScale |
float |
Multiplier applied to the canvas reference resolution. Range 1–10. |
Public methods
Register
Parameters:
handler(AplosWindowHandler) — The window handler to track.
Example
AplosWindowSettings.Instance.Register(windowHandler);
Description: Registers a window so it tracks the shared colors, and applies the current colors to it straight away.
Unregister
Parameters:
handler(AplosWindowHandler) — The window handler to stop tracking.
Example
AplosWindowSettings.Instance.Unregister(windowHandler);
Description: Stops tracking a previously registered window.
ApplyColorSettings
Example
AplosWindowSettings.Instance.ApplyColorSettings();
Description: Reapplies the current bar colors to every registered window. Implements IColorSettingsApplicable.
Register
Parameters:
handler(WindowResizingHandler) — The resizer to track.
Example
AplosWindowSettings.Instance.Register(resizingHandler);
Description: Registers a resizer so it tracks the shared bounds, and seeds it with the current bounds straight away.
Unregister
Parameters:
handler(WindowResizingHandler) — The resizer to stop tracking.
Example
AplosWindowSettings.Instance.Unregister(resizingHandler);
Description: Stops tracking a previously registered resizer.
ApplySettings
Example
AplosWindowSettings.Instance.ApplySettings();
Description: Applies derived settings to resize the window: re-seeds the resize bounds, refreshes logo views against the width threshold, and applies the window scale. Implements ISettingsApplicable.
Register
Parameters:
view(WindowLogoView) — The logo view to track.
Example
AplosWindowSettings.Instance.Register(logoView);
Description: Registers a logo view so it tracks the shared width threshold, and seeds it with the current value straight away.
Unregister
Parameters:
view(WindowLogoView) — The logo view to stop tracking.
Example
AplosWindowSettings.Instance.Unregister(logoView);
Description: Stops tracking a previously registered logo view.