Window Framework v1.2.4
Window Framework for Unity UI Toolkit
Loading...
Searching...
No Matches
GWG.WindowFramework.Editor.ThemeManagerWindow Class Reference
Inheritance 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)

Private Attributes

SerializedObject _serializedObject
ObjectField _settingsField
WindowFrameThemeData _themeData
ThemeListView _themeListView

Static Private Attributes

const string EditorThemePath = "WindowFramework/Themes/WFW-EditorTheme/WFW-EditorTheme"

Member Function Documentation

◆ CreateDataFileItem()

VisualElement GWG.WindowFramework.Editor.ThemeManagerWindow.CreateDataFileItem ( WindowFrameThemeData dataFile)
private

◆ CreateDataFilesList()

VisualElement GWG.WindowFramework.Editor.ThemeManagerWindow.CreateDataFilesList ( )
private

◆ CreateGUI()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateGUI ( )
private
  • 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.

◆ CreateSetupScreen()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateSetupScreen ( )
private

◆ CreateThemeData()

void GWG.WindowFramework.Editor.ThemeManagerWindow.CreateThemeData ( )
private
  • 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.

◆ CreateToolbar()

Toolbar GWG.WindowFramework.Editor.ThemeManagerWindow.CreateToolbar ( )
private
Returns
A configured Toolbar instance containing interactive buttons for management.

◆ FindThemeDataFiles()

List< WindowFrameThemeData > GWG.WindowFramework.Editor.ThemeManagerWindow.FindThemeDataFiles ( )
private

◆ LoadStyles()

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

◆ LoadThemeData()

bool GWG.WindowFramework.Editor.ThemeManagerWindow.LoadThemeData ( )
private
Returns
Returns true if the asset was loaded successfully, false otherwise.

◆ OnDestroy()

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

◆ OnEnable()

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

◆ OnGUI()

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

◆ RefreshDataFilesList()

void GWG.WindowFramework.Editor.ThemeManagerWindow.RefreshDataFilesList ( ScrollView scrollView)
private

◆ SelectDataFile()

void GWG.WindowFramework.Editor.ThemeManagerWindow.SelectDataFile ( WindowFrameThemeData dataFile)
private

◆ ShowWindow()

void GWG.WindowFramework.Editor.ThemeManagerWindow.ShowWindow ( )
static

Member Data Documentation

◆ _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

◆ EditorThemePath

const string GWG.WindowFramework.Editor.ThemeManagerWindow.EditorThemePath = "WindowFramework/Themes/WFW-EditorTheme/WFW-EditorTheme"
staticprivate