b486678290
Library -Artifacts |
||
---|---|---|
.. | ||
ChangeListElements | ||
Menus | ||
AdapterListView.cs | ||
AdapterListView.cs.meta | ||
AlertBox.cs | ||
AlertBox.cs.meta | ||
BetterTextField.cs | ||
BetterTextField.cs.meta | ||
ChangeEntryGroup.cs | ||
ChangeEntryGroup.cs.meta | ||
ChangeListElements.meta | ||
ChangesGroupHeader.cs | ||
ChangesGroupHeader.cs.meta | ||
ErrorPageView.cs | ||
ErrorPageView.cs.meta | ||
HistoryEntryComponent.cs | ||
HistoryEntryComponent.cs.meta | ||
IconButton.cs | ||
IconButton.cs.meta | ||
IconTextButton.cs | ||
IconTextButton.cs.meta | ||
ListNotice.cs | ||
ListNotice.cs.meta | ||
Menus.meta | ||
PageComponent.cs | ||
PageComponent.cs.meta | ||
Paginator.cs | ||
Paginator.cs.meta | ||
ProgressView.cs | ||
ProgressView.cs.meta | ||
README.md | ||
README.md.meta | ||
SearchBar.cs | ||
SearchBar.cs.meta | ||
TabPageComponent.cs | ||
TabPageComponent.cs.meta | ||
TabView.cs | ||
TabView.cs.meta | ||
TextButton.cs | ||
TextButton.cs.meta | ||
TopBar.cs | ||
TopBar.cs.meta |
Resources
This directory contains the UIElements-based user interface components.
Overview
Each component is defined as its own class and file in this directory.
Adding a New Component
Each component is a C# class that extends the UiElements' VisualElement class and provides a UXML factory. If no UXML parameters are required/desired, a simple factory like this (taken from AlertBar) works:
public new class UxmlFactory : UxmlFactory<AlertBar> { }
Just adding this line to the bottom of the component class with the <AlertBar>
replaced with the name of the class.
Adding UXML parameters used to be covered in the official docs. Until it is returned: look at the source code for
any UiElements class such as TextElement.
To use the component in UXML (with editor inspections) the xml schema needs to be updated within the Unity Editor.
Instructions on how to do that is contained in ../Assets/
.