Window Framework for UI Toolkit v2.0.x
GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement Class Reference

Represents a user interface element for configuring context menu settings within the window framework. This form element allows customization of various context menu behaviors, such as fade time and delay. More...

Inheritance diagram for GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement:
Collaboration diagram for GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement:

Public Member Functions

 ContextMenuSettingsFormElement ()
 Constructs the timing form and initializes controls from current preferences.
VisualElement CreateFormElement ()
 Builds a new timing form subtree and stores its slider references on this instance.
void ResetToDefaults ()
 Resets context menu delay and fade duration to default baseline constants.
void SyncUIFromPreferences ()
 Copies current preference values into the existing timing sliders.

Properties

float ContextMenuDelay [get, set]
 Gets/sets pre-fade delay in seconds, clamped to 0..5 on assignment.
float ContextMenuFadeTime [get, set]
 Gets/sets fade duration in seconds, clamped to 0..3 on assignment.

Private Member Functions

void OnAttachToPanel (AttachToPanelEvent evt)
void OnContextMenuDelayChanged (ChangeEvent< float > evt)
void OnContextMenuFadeTimeChanged (ChangeEvent< float > evt)
void OnDetachFromPanel (DetachFromPanelEvent evt)
void OnGeometryChanged (GeometryChangedEvent evt)
void RegisterCallbacks ()

Private Attributes

Slider _contextMenuFadeDelaySlider
Slider _contextMenuFadeTimeSlider

Detailed Description

Represents a user interface element for configuring context menu settings within the window framework. This form element allows customization of various context menu behaviors, such as fade time and delay.

Constructor & Destructor Documentation

◆ ContextMenuSettingsFormElement()

GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.ContextMenuSettingsFormElement ( )
inline

Constructs the timing form and initializes controls from current preferences.

Attach and initial geometry refresh displayed values. Construction installs change callbacks; the current detach handler removes them. Reattachment refreshes values but does not reinstall those callbacks in this implementation; reuse limitations are recorded in the manual. This is a VisualElement, not an EditorWindow or MonoBehaviour.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ CreateFormElement()

VisualElement GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.CreateFormElement ( )
inline

Builds a new timing form subtree and stores its slider references on this instance.

Returns
The constructed subtree; construction uses it as a child of this element.

Not a pure reusable factory: overwrites this instance's slider references and registers callbacks. Prefer constructing a new ContextMenuSettingsFormElement to create another independent form instead of repeatedly calling this method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnAttachToPanel()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.OnAttachToPanel ( AttachToPanelEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnContextMenuDelayChanged()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.OnContextMenuDelayChanged ( ChangeEvent< float > evt)
inlineprivate
Here is the caller graph for this function:

◆ OnContextMenuFadeTimeChanged()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.OnContextMenuFadeTimeChanged ( ChangeEvent< float > evt)
inlineprivate
Here is the caller graph for this function:

◆ OnDetachFromPanel()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.OnDetachFromPanel ( DetachFromPanelEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnGeometryChanged()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.OnGeometryChanged ( GeometryChangedEvent evt)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RegisterCallbacks()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.RegisterCallbacks ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetToDefaults()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.ResetToDefaults ( )
inline

Resets context menu delay and fade duration to default baseline constants.

◆ SyncUIFromPreferences()

void GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.SyncUIFromPreferences ( )
inline

Copies current preference values into the existing timing sliders.

Uses ordinary value assignment, so installed change callbacks can write the resulting clamped values back to preferences. Does not call PlayerPrefs.Save.

Here is the caller graph for this function:

Field Documentation

◆ _contextMenuFadeDelaySlider

Slider GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement._contextMenuFadeDelaySlider
private

◆ _contextMenuFadeTimeSlider

Slider GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement._contextMenuFadeTimeSlider
private

Property Documentation

◆ ContextMenuDelay

float GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.ContextMenuDelay
getset

Gets/sets pre-fade delay in seconds, clamped to 0..5 on assignment.

Uses the context-menu fade-delay preference, not a theme appearance token.

◆ ContextMenuFadeTime

float GWG.WindowFramework.FormElements.ContextMenuSettingsFormElement.ContextMenuFadeTime
getset

Gets/sets fade duration in seconds, clamped to 0..3 on assignment.

Uses PlayerPrefs with configured controller theme-data default (fallback 0.5). Does not rewrite theme USS or call PlayerPrefs.Save on every assignment.