Window Framework for UI Toolkit Scripting v1.3.0
GWG.WindowFramework.Editor.ThemeManagerWindow Class Reference

Represents a custom editor window in Unity, used for managing themes within the Window Framework. More...

Inheritance diagram for GWG.WindowFramework.Editor.ThemeManagerWindow:
Collaboration diagram for GWG.WindowFramework.Editor.ThemeManagerWindow:

Static Public Member Functions

static void ShowWindow ()

Private Member Functions

VisualElement CreateDataFileItem (WindowFrameThemeData dataFile)
VisualElement CreateDataFilesList ()
void CreateGUI ()
 Initializes and configures the visual elements of the theme manager window.
Clears existing UI components, loads necessary styles, and builds the window's layout.
.
void CreateSetupScreen ()
void CreateThemeData ()
 Creates a new instance of the WindowFrameThemeData scriptable object,
saves it as an asset in the project, and updates the PlayerPrefs for reloading functionality.
Opens a save file panel to specify the location and name of the saved theme data file.
If the file path is selected and valid:
.
Toolbar CreateToolbar ()
 Creates and returns a new Toolbar instance for the theme management window.
.
List< WindowFrameThemeDataFindThemeDataFiles ()
void LoadStyles ()
 Loads and applies the specified StyleSheet resource to the current EditorWindow's rootVisualElement. Attempts to load a StyleSheet named "ThemeManagerEditor". If the StyleSheet is found, it is added to the styleSheets collection of the rootVisualElement. If the StyleSheet is not found, no changes are made.
bool LoadThemeData ()
 Loads the WindowFrameThemeData asset from the PlayerPrefs path. If the path is valid, loads the asset and returns true. If the path is invalid, returns false.
void OnDestroy ()
void OnEnable ()
void OnGUI ()
void RefreshDataFilesList (ScrollView scrollView)
void SelectDataFile (WindowFrameThemeData dataFile)
void SetActiveAddressablesButton (Button button)
DropdownMenuAction.Status SetAddressableLabelMenuActiveStatus (DropdownMenuAction arg)
DropdownMenuAction.Status SetAddressablesMenuActiveStatus (DropdownMenuAction arg)
void SetupAddressableLabels (DropdownMenuAction obj)
void ToggleAddressables (DropdownMenuAction dropdownMenuAction)
bool VerifyAddressablesPackage ()

Private Attributes

WindowFrameThemeData _activeAddressablesThemeData
SerializedObject _serializedObject
ObjectField _settingsField
WindowFrameThemeData _themeData
ThemeListView _themeListView

Detailed Description

Represents a custom editor window in Unity, used for managing themes within the Window Framework.

Member Function Documentation

◆ CreateDataFileItem()

VisualElement GWG.WindowFramework.Editor.ThemeManagerWindow.CreateDataFileItem ( WindowFrameThemeData dataFile)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateDataFilesList()

VisualElement GWG.WindowFramework.Editor.ThemeManagerWindow.CreateDataFilesList ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateGUI()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateGUI ( )
inlineprivate

Initializes and configures the visual elements of the theme manager window.
Clears existing UI components, loads necessary styles, and builds the window's layout.
.

  • Adds a toolbar with options to create, clear, and refresh themes.
  • Checks for existing theme data and displays a setup screen if no data is found.
  • Creates and displays global settings and a list of themes if data exists.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateSetupScreen()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateSetupScreen ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateThemeData()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateThemeData ( )
inlineprivate

Creates a new instance of the WindowFrameThemeData scriptable object,
saves it as an asset in the project, and updates the PlayerPrefs for reloading functionality.
Opens a save file panel to specify the location and name of the saved theme data file.
If the file path is selected and valid:
.

  • Creates and saves the asset in the specified path.
  • Refreshes the asset database.
  • Logs the creation of the theme data file.
  • Updates PlayerPrefs with the path of the newly created theme data.
  • Calls CreateGUI to reload the window.
    If no file path is selected, no actions are taken.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateToolbar()

Toolbar GWG.WindowFramework.Editor.ThemeManagerWindow.CreateToolbar ( )
inlineprivate

Creates and returns a new Toolbar instance for the theme management window.
.

Returns
A configured Toolbar instance containing interactive buttons for management.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindThemeDataFiles()

List< WindowFrameThemeData > GWG.WindowFramework.Editor.ThemeManagerWindow.FindThemeDataFiles ( )
inlineprivate
Here is the caller graph for this function:

◆ LoadStyles()

void GWG.WindowFramework.Editor.ThemeManagerWindow.LoadStyles ( )
inlineprivate

Loads and applies the specified StyleSheet resource to the current EditorWindow's rootVisualElement. Attempts to load a StyleSheet named "ThemeManagerEditor". If the StyleSheet is found, it is added to the styleSheets collection of the rootVisualElement. If the StyleSheet is not found, no changes are made.

Here is the caller graph for this function:

◆ LoadThemeData()

bool GWG.WindowFramework.Editor.ThemeManagerWindow.LoadThemeData ( )
inlineprivate

Loads the WindowFrameThemeData asset from the PlayerPrefs path. If the path is valid, loads the asset and returns true. If the path is invalid, returns false.

Returns
Returns true if the asset was loaded successfully, false otherwise.
Here is the caller graph for this function:

◆ OnDestroy()

void GWG.WindowFramework.Editor.ThemeManagerWindow.OnDestroy ( )
inlineprivate

◆ OnEnable()

void GWG.WindowFramework.Editor.ThemeManagerWindow.OnEnable ( )
inlineprivate

◆ OnGUI()

void GWG.WindowFramework.Editor.ThemeManagerWindow.OnGUI ( )
inlineprivate

◆ RefreshDataFilesList()

void GWG.WindowFramework.Editor.ThemeManagerWindow.RefreshDataFilesList ( ScrollView scrollView)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SelectDataFile()

void GWG.WindowFramework.Editor.ThemeManagerWindow.SelectDataFile ( WindowFrameThemeData dataFile)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetActiveAddressablesButton()

void GWG.WindowFramework.Editor.ThemeManagerWindow.SetActiveAddressablesButton ( Button button)
inlineprivate
Here is the caller graph for this function:

◆ SetAddressableLabelMenuActiveStatus()

DropdownMenuAction.Status GWG.WindowFramework.Editor.ThemeManagerWindow.SetAddressableLabelMenuActiveStatus ( DropdownMenuAction arg)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAddressablesMenuActiveStatus()

DropdownMenuAction.Status GWG.WindowFramework.Editor.ThemeManagerWindow.SetAddressablesMenuActiveStatus ( DropdownMenuAction arg)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetupAddressableLabels()

void GWG.WindowFramework.Editor.ThemeManagerWindow.SetupAddressableLabels ( DropdownMenuAction obj)
inlineprivate
Here is the caller graph for this function:

◆ ShowWindow()

void GWG.WindowFramework.Editor.ThemeManagerWindow.ShowWindow ( )
inlinestatic
Here is the caller graph for this function:

◆ ToggleAddressables()

void GWG.WindowFramework.Editor.ThemeManagerWindow.ToggleAddressables ( DropdownMenuAction dropdownMenuAction)
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerifyAddressablesPackage()

bool GWG.WindowFramework.Editor.ThemeManagerWindow.VerifyAddressablesPackage ( )
inlineprivate
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _activeAddressablesThemeData

WindowFrameThemeData GWG.WindowFramework.Editor.ThemeManagerWindow._activeAddressablesThemeData
private

◆ _serializedObject

SerializedObject GWG.WindowFramework.Editor.ThemeManagerWindow._serializedObject
private

◆ _settingsField

ObjectField GWG.WindowFramework.Editor.ThemeManagerWindow._settingsField
private

◆ _themeData

WindowFrameThemeData GWG.WindowFramework.Editor.ThemeManagerWindow._themeData
private

◆ _themeListView

ThemeListView GWG.WindowFramework.Editor.ThemeManagerWindow._themeListView
private