Name Last Update
..
ChangeListElements Loading commit data...
Menus Loading commit data...
AdapterListView.cs Loading commit data...
AdapterListView.cs.meta Loading commit data...
AlertBox.cs Loading commit data...
AlertBox.cs.meta Loading commit data...
BetterTextField.cs Loading commit data...
BetterTextField.cs.meta Loading commit data...
ChangeEntryGroup.cs Loading commit data...
ChangeEntryGroup.cs.meta Loading commit data...
ChangeListElements.meta Loading commit data...
ChangesGroupHeader.cs Loading commit data...
ChangesGroupHeader.cs.meta Loading commit data...
ErrorPageView.cs Loading commit data...
ErrorPageView.cs.meta Loading commit data...
HistoryEntryComponent.cs Loading commit data...
HistoryEntryComponent.cs.meta Loading commit data...
IconButton.cs Loading commit data...
IconButton.cs.meta Loading commit data...
IconTextButton.cs Loading commit data...
IconTextButton.cs.meta Loading commit data...
ListNotice.cs Loading commit data...
ListNotice.cs.meta Loading commit data...
Menus.meta Loading commit data...
PageComponent.cs Loading commit data...
PageComponent.cs.meta Loading commit data...
Paginator.cs Loading commit data...
Paginator.cs.meta Loading commit data...
ProgressView.cs Loading commit data...
ProgressView.cs.meta Loading commit data...
README.md Loading commit data...
README.md.meta Loading commit data...
SearchBar.cs Loading commit data...
SearchBar.cs.meta Loading commit data...
TabPageComponent.cs Loading commit data...
TabPageComponent.cs.meta Loading commit data...
TabView.cs Loading commit data...
TabView.cs.meta Loading commit data...
TextButton.cs Loading commit data...
TextButton.cs.meta Loading commit data...
TopBar.cs Loading commit data...
TopBar.cs.meta Loading commit data...

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/.